[PATCH 1/2] drm/msm/dpu: Initialize return value for dpu_assign_plane_resources()

Jessica Zhang posted 2 patches 1 year, 1 month ago
[PATCH 1/2] drm/msm/dpu: Initialize return value for dpu_assign_plane_resources()
Posted by Jessica Zhang 1 year, 1 month ago
Initialize the return value so that the dpu_crtc_atomic_check() doesn't
fail if the virtual planes command line parameter is enabled and no planes
are visible.

Fixes: 774bcfb73176 ("drm/msm/dpu: add support for virtual planes")
Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
index 098abc2c0003cde90ce6219c97ee18fa055a92a5..74edaa9ecee72111b70f32b832486aeebe545a28 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
@@ -1164,7 +1164,7 @@ int dpu_assign_plane_resources(struct dpu_global_state *global_state,
 			       unsigned int num_planes)
 {
 	unsigned int i;
-	int ret;
+	int ret = 0;
 
 	for (i = 0; i < num_planes; i++) {
 		struct drm_plane_state *plane_state = states[i];

-- 
2.34.1
Re: [PATCH 1/2] drm/msm/dpu: Initialize return value for dpu_assign_plane_resources()
Posted by Dmitry Baryshkov 1 year, 1 month ago
On Wed, Jan 08, 2025 at 02:40:47PM -0800, Jessica Zhang wrote:
> Initialize the return value so that the dpu_crtc_atomic_check() doesn't
> fail if the virtual planes command line parameter is enabled and no planes
> are visible.
> 
> Fixes: 774bcfb73176 ("drm/msm/dpu: add support for virtual planes")
> Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com>
> ---
>  drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

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

-- 
With best wishes
Dmitry