[RESEND 1/3] drm: fsl-dcu: Fix no fb check bug
Daniel Stone
daniel at fooishbar.org
Thu Dec 24 05:37:36 PST 2015
Hi,
On 1 December 2015 at 08:15, Dongsheng Wang
<dongsheng.wang at freescale.com> wrote:
> From: Jianwei Wang <jianwei.wang.chn at gmail.com>
>
> For state->fb may be NULL in fsl_dcu_drm_plane_atomic_check function,
> if so, return -EINVAL. No need check in fsl_dcu_drm_plane_atomic_update
> anymore.
>
> Signed-off-by: Jianwei Wang <jianwei.wang.chn at gmail.com>
> Signed-off-by: Yi Meng <b56799 at freescale.com>
> Signed-off-by: Wang Dongsheng <dongsheng.wang at freescale.com>
> Tested-by: Stefan Agner <stefan at agner.ch>
>
> diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c
> index 51daaea..a8932a8 100644
> --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c
> +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c
> @@ -41,6 +41,9 @@ static int fsl_dcu_drm_plane_atomic_check(struct drm_plane *plane,
> {
> struct drm_framebuffer *fb = state->fb;
>
> + if (!fb)
> + return -EINVAL;
This should be return 0 instead, else you can never disable a plane ...
Cheers,
Daniel
More information about the dri-devel
mailing list