drm/i915/dsb: Improve the indexed reg write checks
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 16 Dec 2022 00:38:04 +0000 (02:38 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 13 Jan 2023 14:51:26 +0000 (16:51 +0200)
commit08b462fd841205a807e4bc0ba58aed7e90ec8bad
tree9d1f2d4333c2c492eb6059cf0db37cd5d32c6d16
parent35118c4c8f564c7aec20eaf8675f5e1cda177a35
drm/i915/dsb: Improve the indexed reg write checks

Currently intel_dsb_indexed_reg_write() just assumes the previous
instructions is also an indexed register write, and thus only
checks the register offset. Make the check more robust by
actually checking the instruction opcode as well.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221216003810.13338-8-ville.syrjala@linux.intel.com
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
drivers/gpu/drm/i915/display/intel_dsb.c