diff options
Diffstat (limited to 'bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0010-UDL-defio-add-fb-lock-and-required-checks.patch')
-rw-r--r-- | bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0010-UDL-defio-add-fb-lock-and-required-checks.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0010-UDL-defio-add-fb-lock-and-required-checks.patch b/bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0010-UDL-defio-add-fb-lock-and-required-checks.patch new file mode 100644 index 00000000..9c52b940 --- /dev/null +++ b/bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0010-UDL-defio-add-fb-lock-and-required-checks.patch @@ -0,0 +1,54 @@ +From f781b63e277a7bc821d9c3415bc84d3e075d5591 Mon Sep 17 00:00:00 2001 +From: Evgeniy Didin <Evgeniy.Didin@synopsys.com> +Date: Wed, 19 Sep 2018 16:57:32 +0300 +Subject: [PATCH] UDL: defio: add fb lock and required checks + +Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com> +--- + drivers/gpu/drm/udl/udl_modeset.c | 18 +++++++++++++++++- + 1 file changed, 17 insertions(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl/udl_modeset.c +index 10794ce2619c..df30b81abf7a 100644 +--- a/drivers/gpu/drm/udl/udl_modeset.c ++++ b/drivers/gpu/drm/udl/udl_modeset.c +@@ -27,12 +27,26 @@ static void pal_modeset_damage(struct drm_device *dev) + { + struct udl_device *udl = dev->dev_private; + struct udl_framebuffer *ufb; ++ struct drm_framebuffer *fb; + +- if (!udl->crtc || !udl->crtc->primary->fb) ++ if (!udl) { ++ pr_warn(" PAL: UDL: no udl! %s:%d", __func__, __LINE__); ++ return; ++ } ++ ++ if (!udl->crtc || !udl->crtc->primary) + return; + ++ fb = udl->crtc->primary->fb; ++ if (!fb) ++ return; ++ ++ drm_modeset_lock_all(fb->dev); ++ + ufb = to_udl_fb(udl->crtc->primary->fb); + udl_handle_damage(ufb, 0, 0, ufb->base.width, ufb->base.height); ++ ++ drm_modeset_unlock_all(fb->dev); + } + + static void pal_deferred_io_work(struct work_struct *work) +@@ -44,6 +58,8 @@ static void pal_deferred_io_work(struct work_struct *work) + static void pal_deferred_io_cleanup(void) + { + cancel_delayed_work_sync(&deferred_work); ++ ++ pr_info(" PAL: UDL: cancel deferred io! %s:%d", __func__, __LINE__); + } + + static void pal_deferred_io_init(struct drm_device *dev) +-- +2.16.2 + |