diff mbox series

[3/3] drm/msm/dpu: remove hard-coded linewidth limit for writeback

Message ID 1655235140-16424-3-git-send-email-quic_abhinavk@quicinc.com (mailing list archive)
State New, archived
Headers show
Series [1/3] drm/msm/dpu: move intf and wb assignment to dpu_encoder_setup_display() | expand

Commit Message

Abhinav Kumar June 14, 2022, 7:32 p.m. UTC
Remove the hard-coded limit for writeback and lets start using
the one from catalog instead.

Fixes: d7d0e73f7de3 ("introduce the dpu_encoder_phys_* for writeback")
Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Dmitry Baryshkov June 15, 2022, 12:38 p.m. UTC | #1
On 14/06/2022 22:32, Abhinav Kumar wrote:
> Remove the hard-coded limit for writeback and lets start using
> the one from catalog instead.
> 
> Fixes: d7d0e73f7de3 ("introduce the dpu_encoder_phys_* for writeback")
> Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>


> ---
>   drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c
> index 59da348ff339..fc1d4fda69b5 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c
> @@ -20,8 +20,6 @@
>   #include "dpu_crtc.h"
>   #include "disp/msm_disp_snapshot.h"
>   
> -#define DEFAULT_MAX_WRITEBACK_WIDTH 2048
> -
>   #define to_dpu_encoder_phys_wb(x) \
>   	container_of(x, struct dpu_encoder_phys_wb, base)
>   
> @@ -278,9 +276,9 @@ static int dpu_encoder_phys_wb_atomic_check(
>   		DPU_ERROR("invalid fb h=%d, mode h=%d\n", fb->height,
>   				  mode->vdisplay);
>   		return -EINVAL;
> -	} else if (fb->width > DEFAULT_MAX_WRITEBACK_WIDTH) {
> +	} else if (fb->width > phys_enc->hw_wb->caps->maxlinewidth) {
>   		DPU_ERROR("invalid fb w=%d, maxlinewidth=%u\n",
> -				  fb->width, DEFAULT_MAX_WRITEBACK_WIDTH);
> +				  fb->width, phys_enc->hw_wb->caps->maxlinewidth);
>   		return -EINVAL;
>   	}
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c
index 59da348ff339..fc1d4fda69b5 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c
@@ -20,8 +20,6 @@ 
 #include "dpu_crtc.h"
 #include "disp/msm_disp_snapshot.h"
 
-#define DEFAULT_MAX_WRITEBACK_WIDTH 2048
-
 #define to_dpu_encoder_phys_wb(x) \
 	container_of(x, struct dpu_encoder_phys_wb, base)
 
@@ -278,9 +276,9 @@  static int dpu_encoder_phys_wb_atomic_check(
 		DPU_ERROR("invalid fb h=%d, mode h=%d\n", fb->height,
 				  mode->vdisplay);
 		return -EINVAL;
-	} else if (fb->width > DEFAULT_MAX_WRITEBACK_WIDTH) {
+	} else if (fb->width > phys_enc->hw_wb->caps->maxlinewidth) {
 		DPU_ERROR("invalid fb w=%d, maxlinewidth=%u\n",
-				  fb->width, DEFAULT_MAX_WRITEBACK_WIDTH);
+				  fb->width, phys_enc->hw_wb->caps->maxlinewidth);
 		return -EINVAL;
 	}