Skip to content

Commit 25ea341

Browse files
committed
drm/i915/dsb: Use non-posted register writes for legacy LUT
The DSB has problems writing the legacy LUT. The two workarounds I've discoverted are: - write each entry twice back to back - use non-posted writes Let's use non-posted writes as that seems a bit more standard. TODO: measure which is faster Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230606191504.18099-14-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar <uma.shankar@intel.com>
1 parent 5ae0da3 commit 25ea341

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

drivers/gpu/drm/i915/display/intel_color.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,9 +1329,20 @@ static void ilk_load_lut_8(const struct intel_crtc_state *crtc_state,
13291329

13301330
lut = blob->data;
13311331

1332+
/*
1333+
* DSB fails to correctly load the legacy LUT
1334+
* unless we either write each entry twice,
1335+
* or use non-posted writes
1336+
*/
1337+
if (crtc_state->dsb)
1338+
intel_dsb_nonpost_start(crtc_state->dsb);
1339+
13321340
for (i = 0; i < 256; i++)
13331341
ilk_lut_write(crtc_state, LGC_PALETTE(pipe, i),
13341342
i9xx_lut_8(&lut[i]));
1343+
1344+
if (crtc_state->dsb)
1345+
intel_dsb_nonpost_end(crtc_state->dsb);
13351346
}
13361347

13371348
static void ilk_load_lut_10(const struct intel_crtc_state *crtc_state,

0 commit comments

Comments
 (0)