/linux/drivers/gpu/drm/ |
H A D | drm_atomic_state_helper.c | 42 #include <linux/dma-fence.h> 45 * DOC: atomic state reset and initialization 48 * and correct atomic software state for all connectors, CRTCs and planes 50 * suspend. One way to solve this is to have a hardware state read-out 51 * infrastructure which reconstructs the full software state (e.g. the i915 54 * The simpler solution is to just reset the software state to everything off, 58 * On the upside the precise state tracking of atomic simplifies system suspend 66 * __drm_atomic_helper_crtc_state_reset - reset the CRTC state 67 * @crtc_state: atomic CRTC state, must not be NULL 71 * values. This is useful for drivers that subclass the CRTC state. [all …]
|
H A D | drm_atomic.c | 4 * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved. 59 * drm_crtc_commit_wait - Waits for a commit to complete 76 ret = wait_for_completion_timeout(&commit->hw_done, timeout); in drm_crtc_commit_wait() 78 drm_err(commit->crtc->dev, "hw_done timed out\n"); in drm_crtc_commit_wait() 79 return -ETIMEDOUT; in drm_crtc_commit_wait() 86 ret = wait_for_completion_timeout(&commit->flip_done, timeout); in drm_crtc_commit_wait() 88 drm_err(commit->crtc->dev, "flip_done timed out\n"); in drm_crtc_commit_wait() 89 return -ETIMEDOUT; in drm_crtc_commit_wait() 97 * drm_atomic_state_default_release - 99 * @state: atomic state [all …]
|
/linux/arch/arc/kernel/ |
H A D | disasm.c | 1 // SPDX-License-Identifier: GPL-2.0-only 6 * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) 19 * findings in *state 21 void __kprobes disasm_instr(unsigned long addr, struct disasm_state *state, in disasm_instr() argument 32 memset(state, 0, sizeof(struct disasm_state)); in disasm_instr() 48 state->major_opcode = (word1 >> 11) & 0x1F; in disasm_instr() 51 if (state->major_opcode < 0x0B) { in disasm_instr() 54 state->instr_len = 4; in disasm_instr() 56 state->words[0] = (word1 << 16) | word0; in disasm_instr() 58 state->instr_len = 2; in disasm_instr() [all …]
|
/linux/drivers/video/ |
H A D | vgastate.c | 2 * linux/drivers/video/vgastate.c -- VGA state save/restore 48 static void save_vga_text(struct vgastate *state, void __iomem *fbbase) in save_vga_text() argument 50 struct regstate *saved = (struct regstate *) state->vidstate; in save_vga_text() 56 misc = vga_r(state->vgabase, VGA_MIS_R); in save_vga_text() 59 vga_r(state->vgabase, iobase + 0xa); in save_vga_text() 60 vga_w(state->vgabase, VGA_ATT_W, 0x00); in save_vga_text() 61 attr10 = vga_rattr(state->vgabase, 0x10); in save_vga_text() 62 vga_r(state->vgabase, iobase + 0xa); in save_vga_text() 63 vga_w(state->vgabase, VGA_ATT_W, 0x20); in save_vga_text() 69 gr4 = vga_rgfx(state->vgabase, VGA_GFX_PLANE_READ); in save_vga_text() [all …]
|
/linux/tools/testing/selftests/kvm/x86/ |
H A D | vmx_set_nested_state_test.c | 1 // SPDX-License-Identifier: GPL-2.0-only 29 void test_nested_state(struct kvm_vcpu *vcpu, struct kvm_nested_state *state) in test_nested_state() argument 31 vcpu_nested_state_set(vcpu, state); in test_nested_state() 35 struct kvm_nested_state *state, in test_nested_state_expect_errno() argument 40 rv = __vcpu_nested_state_set(vcpu, state); in test_nested_state_expect_errno() 41 TEST_ASSERT(rv == -1 && errno == expected_errno, in test_nested_state_expect_errno() 48 struct kvm_nested_state *state) in test_nested_state_expect_einval() argument 50 test_nested_state_expect_errno(vcpu, state, EINVAL); in test_nested_state_expect_einval() 54 struct kvm_nested_state *state) in test_nested_state_expect_efault() argument 56 test_nested_state_expect_errno(vcpu, state, EFAULT); in test_nested_state_expect_efault() [all …]
|
/linux/lib/zlib_inflate/ |
H A D | inflate.c | 1 /* inflate.c -- zlib decompression 2 * Copyright (C) 1995-2005 Mark Adler 18 /* architecture-specific bits */ 35 struct inflate_state *state; in zlib_inflateReset() local 37 if (strm == NULL || strm->state == NULL) return Z_STREAM_ERROR; in zlib_inflateReset() 38 state = (struct inflate_state *)strm->state; in zlib_inflateReset() 39 strm->total_in = strm->total_out = state->total = 0; in zlib_inflateReset() 40 strm->msg = NULL; in zlib_inflateReset() 41 strm->adler = 1; /* to support ill-conceived Java test suite */ in zlib_inflateReset() 42 state->mode = HEAD; in zlib_inflateReset() [all …]
|
/linux/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/ |
H A D | fifo_monitor.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * Copyright (c) 2010-2015, Intel Corporation. 47 fifo_channel_state_t *state) in fifo_channel_get_state() argument 50 assert(state); in fifo_channel_get_state() 54 state->src_valid = fifo_monitor_status_valid(ID, in fifo_channel_get_state() 57 state->fifo_accept = fifo_monitor_status_accept(ID, in fifo_channel_get_state() 60 state->fifo_valid = fifo_monitor_status_valid(ID, in fifo_channel_get_state() 63 state->sink_accept = fifo_monitor_status_accept(ID, in fifo_channel_get_state() 68 state->src_valid = fifo_monitor_status_valid(ID, in fifo_channel_get_state() 71 state->fifo_accept = fifo_monitor_status_accept(ID, in fifo_channel_get_state() [all …]
|
/linux/fs/btrfs/ |
H A D | extent-io-tree.c | 1 // SPDX-License-Identifier: GPL-2.0 8 #include "extent-io-tree.h" 13 static inline bool extent_state_in_tree(const struct extent_state *state) in extent_state_in_tree() argument 15 return !RB_EMPTY_NODE(&state->rb_node); in extent_state_in_tree() 22 static inline void btrfs_leak_debug_add_state(struct extent_state *state) in btrfs_leak_debug_add_state() argument 27 list_add(&state->leak_list, &states); in btrfs_leak_debug_add_state() 31 static inline void btrfs_leak_debug_del_state(struct extent_state *state) in btrfs_leak_debug_del_state() argument 36 list_del(&state->leak_list); in btrfs_leak_debug_del_state() 42 struct extent_state *state; in btrfs_extent_state_leak_debug_check() local 45 state = list_first_entry(&states, struct extent_state, leak_list); in btrfs_extent_state_leak_debug_check() [all …]
|
/linux/drivers/media/pci/bt8xx/ |
H A D | dst.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 45 static int dst_command(struct dst_state *state, u8 *data, u8 len); 47 static void dst_packsize(struct dst_state *state, int psize) in dst_packsize() argument 52 bt878_device_control(state->bt, DST_IG_TS, &bits); in dst_packsize() 55 static int dst_gpio_outb(struct dst_state *state, u32 mask, u32 enbb, in dst_gpio_outb() argument 67 if ((err = bt878_device_control(state->bt, DST_IG_ENABLE, &enb)) < 0) { in dst_gpio_outb() 70 return -EREMOTEIO; in dst_gpio_outb() 80 if ((err = bt878_device_control(state->bt, DST_IG_WRITE, &bits)) < 0) { in dst_gpio_outb() 83 return -EREMOTEIO; in dst_gpio_outb() 89 static int dst_gpio_inb(struct dst_state *state, u8 *result) in dst_gpio_inb() argument [all …]
|
/linux/drivers/media/dvb-frontends/ |
H A D | drxd_hard.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * drxd_hard.c: DVB-T Demodulator Micronas DRX3975D-A2,DRX397xD-B1 5 * Copyright (C) 2003-2007 Micronas 21 #define DRX_FW_FILENAME_A2 "drxd-a2-1.1.fw" 22 #define DRX_FW_FILENAME_B1 "drxd-b1-1.1.fw" 194 return -1; in i2c_write() 211 return -1; in i2c_read() 225 static int Read16(struct drxd_state *state, u32 reg, u16 *data, u8 flags) in Read16() argument 227 u8 adr = state->config.demod_address; in Read16() 232 if (i2c_read(state->i2c, adr, mm1, 4, mm2, 2) < 0) in Read16() [all …]
|
H A D | drxk_hard.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * drxk_hard: DRX-K DVB-C/T demodulator driver 5 * Copyright (C) 2010-2011 Digital Devices GmbH 25 static int power_down_dvbt(struct drxk_state *state, bool set_power_mode); 26 static int power_down_qam(struct drxk_state *state); 27 static int set_dvbt_standard(struct drxk_state *state, 29 static int set_qam_standard(struct drxk_state *state, 31 static int set_qam(struct drxk_state *state, u16 intermediate_freqk_hz, 33 static int set_dvbt_standard(struct drxk_state *state, 35 static int dvbt_start(struct drxk_state *state); [all …]
|
H A D | stv090x.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 52 ((temp_dev->internal->i2c_adap != i2c_adap) || in find_dev() 53 (temp_dev->internal->i2c_addr != i2c_addr))) { in find_dev() 55 temp_dev = temp_dev->next_dev; in find_dev() 65 struct stv090x_dev *del_dev = find_dev(internal->i2c_adap, in remove_dev() 66 internal->i2c_addr); in remove_dev() 70 stv090x_first_dev = del_dev->next_dev; in remove_dev() 72 while (prev_dev->next_dev != del_dev) in remove_dev() 73 prev_dev = prev_dev->next_dev; in remove_dev() 75 prev_dev->next_dev = del_dev->next_dev; in remove_dev() [all …]
|
H A D | stv0910.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Driver for the ST STV0910 DVB-S/S2 demodulator. 5 * Copyright (C) 2014-2015 Ralph Metzler <rjkm@metzlerbros.de> 127 static int write_reg(struct stv *state, u16 reg, u8 val) in write_reg() argument 129 struct i2c_adapter *adap = state->base->i2c; in write_reg() 131 struct i2c_msg msg = {.addr = state->base->adr, .flags = 0, in write_reg() 135 dev_warn(&adap->dev, "i2c write error ([%02x] %04x: %02x)\n", in write_reg() 136 state->base->adr, reg, val); in write_reg() 137 return -EIO; in write_reg() 152 dev_warn(&adapter->dev, "i2c read error ([%02x] %04x)\n", in i2c_read_regs16() [all …]
|
H A D | cx24113.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Copyright (C) 2007-8 Patrick Boettcher <pb@linuxtv.org> 90 static int cx24113_writereg(struct cx24113_state *state, int reg, int data) in cx24113_writereg() argument 93 struct i2c_msg msg = { .addr = state->config->i2c_addr, in cx24113_writereg() 95 int err = i2c_transfer(state->i2c, &msg, 1); in cx24113_writereg() 105 static int cx24113_readreg(struct cx24113_state *state, u8 reg) in cx24113_readreg() argument 110 { .addr = state->config->i2c_addr, in cx24113_readreg() 112 { .addr = state->config->i2c_addr, in cx24113_readreg() 116 ret = i2c_transfer(state->i2c, msg, 2); in cx24113_readreg() 127 static void cx24113_set_parameters(struct cx24113_state *state) in cx24113_set_parameters() argument [all …]
|
H A D | s5h1420.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 8 * Copyright (C) 2005-8 Patrick Boettcher <pb@linuxtv.org> 44 /* FIXME: ugly workaround for flexcop's incapable i2c-controller 45 * it does not support repeated-start, workaround: write addr-1 51 static u32 s5h1420_getsymbolrate(struct s5h1420_state* state); 65 static u8 s5h1420_readreg(struct s5h1420_state *state, u8 reg) in s5h1420_readreg() argument 70 { .addr = state->config->demod_address, .flags = 0, .buf = b, .len = 2 }, in s5h1420_readreg() 71 { .addr = state->config->demod_address, .flags = 0, .buf = ®, .len = 1 }, in s5h1420_readreg() 72 { .addr = state->config->demod_address, .flags = I2C_M_RD, .buf = b, .len = 1 }, in s5h1420_readreg() 75 b[0] = (reg - 1) & 0xff; in s5h1420_readreg() [all …]
|
H A D | stv0297.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 Copyright (C) 2003-2004 Dennis Noermann <dennis.noermann@noernet.de> 39 static int stv0297_writereg(struct stv0297_state *state, u8 reg, u8 data) in stv0297_writereg() argument 43 struct i2c_msg msg = {.addr = state->config->demod_address,.flags = 0,.buf = buf,.len = 2 }; in stv0297_writereg() 45 ret = i2c_transfer(state->i2c, &msg, 1); in stv0297_writereg() 51 return (ret != 1) ? -1 : 0; in stv0297_writereg() 54 static int stv0297_readreg(struct stv0297_state *state, u8 reg) in stv0297_readreg() argument 59 struct i2c_msg msg[] = { {.addr = state->config->demod_address,.flags = 0,.buf = b0,.len = 1}, in stv0297_readreg() 60 {.addr = state->config->demod_address,.flags = I2C_M_RD,.buf = b1,.len = 1} in stv0297_readreg() 64 if (state->config->stop_during_read) { in stv0297_readreg() [all …]
|
H A D | dib8000.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Linux-DVB Driver for DiBcom's DiB8000 chip (ISDB-T). 22 #define LAYER_ALL -1 149 {.addr = i2c->addr >> 1, .flags = 0, .len = 2}, in dib8000_i2c_read16() 150 {.addr = i2c->addr >> 1, .flags = I2C_M_RD, .len = 2}, in dib8000_i2c_read16() 153 if (mutex_lock_interruptible(i2c->i2c_buffer_lock) < 0) { in dib8000_i2c_read16() 158 msg[0].buf = i2c->i2c_write_buffer; in dib8000_i2c_read16() 161 msg[1].buf = i2c->i2c_read_buffer; in dib8000_i2c_read16() 163 if (i2c_transfer(i2c->adap, msg, 2) != 2) in dib8000_i2c_read16() 167 mutex_unlock(i2c->i2c_buffer_lock); in dib8000_i2c_read16() [all …]
|
H A D | stv0367.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Driver for ST STV0367 DVB-T & DVB-C demodulator IC. 39 /* DVB-C */ 44 enum stv0367_cab_signal_type state; member 58 /* DVB-T */ 59 enum stv0367_ter_signal_type state; member 84 /* DVB-C */ 86 /* DVB-T */ 98 /* RF Level (for RF AGC->AGC1) Lookup Table, depends on the board and tuner.*/ 110 /* RF Level (for IF AGC->AGC2) Lookup Table, depends on the board and tuner.*/ [all …]
|
/linux/drivers/gpu/drm/amd/display/dc/core/ |
H A D | dc_state.c | 43 dc->ctx->logger 47 static bool dc_state_track_phantom_stream(struct dc_state *state, in dc_state_track_phantom_stream() argument 50 if (state->phantom_stream_count >= MAX_PHANTOM_PIPES) in dc_state_track_phantom_stream() 53 state->phantom_streams[state->phantom_stream_count++] = phantom_stream; in dc_state_track_phantom_stream() 58 static bool dc_state_untrack_phantom_stream(struct dc_state *state, struct dc_stream_state *phantom… in dc_state_untrack_phantom_stream() argument 64 for (i = 0; i < state->phantom_stream_count; i++) { in dc_state_untrack_phantom_stream() 65 if (state->phantom_streams[i] == phantom_stream) { in dc_state_untrack_phantom_stream() 66 state->phantom_streams[i] = NULL; in dc_state_untrack_phantom_stream() 72 /* failed to find stream in state */ in dc_state_untrack_phantom_stream() 77 state->phantom_stream_count--; in dc_state_untrack_phantom_stream() [all …]
|
/linux/drivers/media/usb/dvb-usb/ |
H A D | dtt200u-fe.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Typhoon/ Yuan DVB-T USB2.0 receiver. 7 * see Documentation/driver-api/media/drivers/dvb-usb.rst for more information 26 struct dtt200u_fe_state *state = fe->demodulator_priv; in dtt200u_fe_read_status() local 29 mutex_lock(&state->data_mutex); in dtt200u_fe_read_status() 30 state->data[0] = GET_TUNE_STATUS; in dtt200u_fe_read_status() 32 ret = dvb_usb_generic_rw(state->d, state->data, 1, state->data, 3, 0); in dtt200u_fe_read_status() 35 mutex_unlock(&state->data_mutex); in dtt200u_fe_read_status() 39 switch (state->data[0]) { in dtt200u_fe_read_status() 52 mutex_unlock(&state->data_mutex); in dtt200u_fe_read_status() [all …]
|
/linux/arch/x86/kernel/ |
H A D | unwind_frame.c | 1 // SPDX-License-Identifier: GPL-2.0-only 14 unsigned long unwind_get_return_address(struct unwind_state *state) in unwind_get_return_address() argument 16 if (unwind_done(state)) in unwind_get_return_address() 19 return __kernel_text_address(state->ip) ? state->ip : 0; in unwind_get_return_address() 23 unsigned long *unwind_get_return_address_ptr(struct unwind_state *state) in unwind_get_return_address_ptr() argument 25 if (unwind_done(state)) in unwind_get_return_address_ptr() 28 return state->regs ? &state->regs->ip : state->bp + 1; in unwind_get_return_address_ptr() 31 static void unwind_dump(struct unwind_state *state) in unwind_dump() argument 45 state->stack_info.type, state->stack_info.next_sp, in unwind_dump() 46 state->stack_mask, state->graph_idx); in unwind_dump() [all …]
|
/linux/drivers/media/i2c/ |
H A D | s5k5baf.c | 1 // SPDX-License-Identifier: GPL-2.0-only 24 #include <media/media-entity.h> 25 #include <media/v4l2-ctrls.h> 26 #include <media/v4l2-device.h> 27 #include <media/v4l2-subdev.h> 28 #include <media/v4l2-mediabus.h> 29 #include <media/v4l2-fwnode.h> 38 #define S5K5BAF_FW_FILENAME "s5k5baf-cfg.bin" 50 /* Default number of MIPI CSI-2 data lanes used */ 199 /* Auto-algorithms enable mask */ [all …]
|
H A D | adv7180.c | 1 // SPDX-License-Identifier: GPL-2.0 19 #include <media/v4l2-ioctl.h> 20 #include <media/v4l2-event.h> 21 #include <media/v4l2-device.h> 22 #include <media/v4l2-ctrls.h> 62 #define ADV7180_BRI_MIN -128 67 #define ADV7180_HUE_MIN -127 205 int (*init)(struct adv7180_state *state); 229 #define to_adv7180_sd(_ctrl) (&container_of(_ctrl->handler, \ 231 ctrl_hdl)->sd) [all …]
|
/linux/drivers/media/platform/samsung/exynos4-is/ |
H A D | mipi-csis.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Samsung S5P/EXYNOS SoC series MIPI-CSI receiver driver 5 * Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd. 29 #include <media/drv-intf/exynos-fimc.h> 30 #include <media/v4l2-fwnode.h> 31 #include <media/v4l2-subdev.h> 33 #include "mipi-csis.h" 37 MODULE_PARM_DESC(debug, "Debug level (0-2)"); 51 /* D-PHY control */ 62 #define S5PCSIS_CFG_FMT_USER(x) ((0x30 + x - 1) << 2) [all …]
|
/linux/drivers/soc/qcom/ |
H A D | smem_state.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. 18 * struct qcom_smem_state - state context 19 * @refcount: refcount for the state 20 * @orphan: boolean indicator that this state has been unregistered 22 * @of_node: of_node to use for matching the state in DT 24 * @ops: ops for the state 39 * qcom_smem_state_update_bits() - update the masked bits in state with value 40 * @state: state handle acquired by calling qcom_smem_state_get() 46 int qcom_smem_state_update_bits(struct qcom_smem_state *state, in qcom_smem_state_update_bits() argument [all …]
|