mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 02:19:51 +00:00
drm: fsl-dcu: Fix no fb check bug
For state->fb or state->crtc may be NULL in fsl_dcu_drm_plane_atomic_check function, if so, return 0. Signed-off-by: Meng Yi <meng.yi@nxp.com> Signed-off-by: Jianwei Wang <jianwei.wang.chn@gmail.com> Signed-off-by: Stefan Agner <stefan@agner.ch>
This commit is contained in:
parent
bc66757a0e
commit
a36c9867d4
1 changed files with 3 additions and 0 deletions
|
@ -41,6 +41,9 @@ static int fsl_dcu_drm_plane_atomic_check(struct drm_plane *plane,
|
|||
{
|
||||
struct drm_framebuffer *fb = state->fb;
|
||||
|
||||
if (!state->fb || !state->crtc)
|
||||
return 0;
|
||||
|
||||
switch (fb->pixel_format) {
|
||||
case DRM_FORMAT_RGB565:
|
||||
case DRM_FORMAT_RGB888:
|
||||
|
|
Loading…
Reference in a new issue