linux/drivers/gpu/drm/i915/gvt
Jonathan Cavitt 1cabff0d18 drm/i915/gvt: Swap read and write checks
The function intel_gvt_i2c_handle_aux_ch_write currently does not
support the DP_AUX_I2C_WRITE operation.  Notably, we check if
op & 0x1 == DP_AUX_I2C_WRITE (one), and if it does not, assert that
op & 0x1 == DP_AUX_I2C_READ (zero).  This is unnecessary because if
op & 0x1 != 1, then op & 0x1 == 0.  But beyond that, it probably makes
more sense to check for the condition that is implemented, rather than
check for the condition that is not.

Swap the conditions.  We can also get rid of the unnecessary drm_WARN_ON
while we're here.

Suggested-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patch.msgid.link/20260204161945.8127-2-jonathan.cavitt@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2026-03-17 11:27:14 +02:00
..
aperture_gm.c drm/i915/gvt: sort and group include directives 2026-01-02 12:17:24 +02:00
cfg_space.c drm/i915/gvt: sort and group include directives 2026-01-02 12:17:24 +02:00
cmd_parser.c Merge drm/drm-next into drm-intel-next 2026-02-25 13:23:04 +02:00
cmd_parser.h
debug.h
debugfs.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
display_helpers.h drm/i915/gvt/display_helper: Get rid of #ifdef/#undefs 2025-12-29 17:43:47 +05:30
display.c Merge drm/drm-next into drm-intel-next 2026-02-25 13:23:04 +02:00
display.h drm/i915/gvt: sort and group include directives 2026-01-02 12:17:24 +02:00
dmabuf.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dmabuf.h drm/i915/gvt: reduce include of vfio.h 2026-01-02 12:17:24 +02:00
edid.c drm/i915/gvt: Swap read and write checks 2026-03-17 11:27:14 +02:00
edid.h
execlist.c drm/i915/gvt: sort and group include directives 2026-01-02 12:17:24 +02:00
execlist.h
fb_decoder.c drm/i915/gvt: sort and group include directives 2026-01-02 12:17:24 +02:00
fb_decoder.h drm/i915/gvt: include intel_display_limits.h where needed 2026-01-02 12:17:24 +02:00
firmware.c drm/i915/gvt: sort and group include directives 2026-01-02 12:17:24 +02:00
gtt.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
gtt.h
gvt.h drm/i915/gvt: include intel_display_limits.h where needed 2026-01-02 12:17:24 +02:00
handlers.c drm/{i915, xe}/reg: rename masked field helpers REG_MASKED_FIELD*() 2026-03-04 13:04:24 +02:00
interrupt.c drm/i915: Remove i915_reg.h from intel_display_irq.c 2026-02-12 16:13:14 +05:30
interrupt.h
kvmgt.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
Makefile
mmio_context.c drm/{i915, xe}/reg: rename masked field helpers REG_MASKED_FIELD*() 2026-03-04 13:04:24 +02:00
mmio_context.h drm/i915/gvt: reduce include of gt/intel_engine_regs.h 2026-01-02 12:17:24 +02:00
mmio.c drm/i915/gvt: sort and group include directives 2026-01-02 12:17:24 +02:00
mmio.h
opregion.c drm/i915/gvt: sort and group include directives 2026-01-02 12:17:24 +02:00
page_track.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
page_track.h
reg.h drm/{i915, xe}/reg: rename masked field helpers REG_MASKED_FIELD*() 2026-03-04 13:04:24 +02:00
sched_policy.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sched_policy.h
scheduler.c drm/i915/gvt: reduce include of gt/intel_engine_regs.h 2026-01-02 12:17:24 +02:00
scheduler.h
trace_points.c drm/i915/gvt: sort and group include directives 2026-01-02 12:17:24 +02:00
trace.h drm/i915/gvt: sort and group include directives 2026-01-02 12:17:24 +02:00
vgpu.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00