Commit 79caf2f2 authored by Abhinav Kumar's avatar Abhinav Kumar Committed by Dmitry Baryshkov

drm/msm/dpu: fix writeback programming for YUV cases

For YUV cases, setting the required format bits was missed
out in the register programming. Lets fix it now in preparation
of adding YUV formats support for writeback.

changes in v2:
    - dropped the fixes tag as its not a fix but adding
      new functionality
Signed-off-by: default avatarAbhinav Kumar <quic_abhinavk@quicinc.com>
Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/571814/
Link: https://lore.kernel.org/r/20231212205254.12422-4-quic_abhinavk@quicinc.comSigned-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
parent ecf59445
...@@ -272,7 +272,6 @@ static int dpu_encoder_phys_wb_atomic_check( ...@@ -272,7 +272,6 @@ static int dpu_encoder_phys_wb_atomic_check(
{ {
struct drm_framebuffer *fb; struct drm_framebuffer *fb;
const struct drm_display_mode *mode = &crtc_state->mode; const struct drm_display_mode *mode = &crtc_state->mode;
int ret;
DPU_DEBUG("[atomic_check:%d, \"%s\",%d,%d]\n", DPU_DEBUG("[atomic_check:%d, \"%s\",%d,%d]\n",
phys_enc->hw_wb->idx, mode->name, mode->hdisplay, mode->vdisplay); phys_enc->hw_wb->idx, mode->name, mode->hdisplay, mode->vdisplay);
......
...@@ -89,6 +89,9 @@ static void dpu_hw_wb_setup_format(struct dpu_hw_wb *ctx, ...@@ -89,6 +89,9 @@ static void dpu_hw_wb_setup_format(struct dpu_hw_wb *ctx,
dst_format |= BIT(14); /* DST_ALPHA_X */ dst_format |= BIT(14); /* DST_ALPHA_X */
} }
if (DPU_FORMAT_IS_YUV(fmt))
dst_format |= BIT(15);
pattern = (fmt->element[3] << 24) | pattern = (fmt->element[3] << 24) |
(fmt->element[2] << 16) | (fmt->element[2] << 16) |
(fmt->element[1] << 8) | (fmt->element[1] << 8) |
......
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