Commit c94d13e9 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Make the CHV CGM CSC register writes lockless

The CHV CGM CSC registers are single buffered and so we
may have to write them from the vblank worker, which
imposes very tight dealines. Drop the pointless locking
for the register accessess to reduce the overhead.
All the other registers we bash from the vblank worker
(LUTs) were already made lockless earlier.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220202111616.1579-3-ville.syrjala@linux.intel.comReviewed-by: default avatarJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
parent 61b3b2da
...@@ -396,16 +396,16 @@ static void chv_load_cgm_csc(struct intel_crtc *crtc, ...@@ -396,16 +396,16 @@ static void chv_load_cgm_csc(struct intel_crtc *crtc,
coeffs[i] |= (abs_coeff >> 20) & 0xfff; coeffs[i] |= (abs_coeff >> 20) & 0xfff;
} }
intel_de_write(dev_priv, CGM_PIPE_CSC_COEFF01(pipe), intel_de_write_fw(dev_priv, CGM_PIPE_CSC_COEFF01(pipe),
coeffs[1] << 16 | coeffs[0]); coeffs[1] << 16 | coeffs[0]);
intel_de_write(dev_priv, CGM_PIPE_CSC_COEFF23(pipe), intel_de_write_fw(dev_priv, CGM_PIPE_CSC_COEFF23(pipe),
coeffs[3] << 16 | coeffs[2]); coeffs[3] << 16 | coeffs[2]);
intel_de_write(dev_priv, CGM_PIPE_CSC_COEFF45(pipe), intel_de_write_fw(dev_priv, CGM_PIPE_CSC_COEFF45(pipe),
coeffs[5] << 16 | coeffs[4]); coeffs[5] << 16 | coeffs[4]);
intel_de_write(dev_priv, CGM_PIPE_CSC_COEFF67(pipe), intel_de_write_fw(dev_priv, CGM_PIPE_CSC_COEFF67(pipe),
coeffs[7] << 16 | coeffs[6]); coeffs[7] << 16 | coeffs[6]);
intel_de_write(dev_priv, CGM_PIPE_CSC_COEFF8(pipe), intel_de_write_fw(dev_priv, CGM_PIPE_CSC_COEFF8(pipe),
coeffs[8]); coeffs[8]);
} }
/* convert hw value with given bit_precision to lut property val */ /* convert hw value with given bit_precision to lut property val */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment