diff options
author | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
---|---|---|
committer | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
commit | 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch) | |
tree | cd70a267a5ef105ba32f200aa088e281fbd85747 /bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0009-UDL-add-pseudo-deferred-io-for-modeset-drive.patch | |
parent | 4204309872da5cb401cbb2729d9e2d4869a87f42 (diff) |
basesystem-jjsandbox/ToshikazuOhiwa/master-jj
recipes
Diffstat (limited to 'bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0009-UDL-add-pseudo-deferred-io-for-modeset-drive.patch')
-rw-r--r-- | bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0009-UDL-add-pseudo-deferred-io-for-modeset-drive.patch | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0009-UDL-add-pseudo-deferred-io-for-modeset-drive.patch b/bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0009-UDL-add-pseudo-deferred-io-for-modeset-drive.patch new file mode 100644 index 00000000..9ca4f1eb --- /dev/null +++ b/bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0009-UDL-add-pseudo-deferred-io-for-modeset-drive.patch @@ -0,0 +1,79 @@ +From dba8746636e35f3e42bed62f5b7d7231adf569c8 Mon Sep 17 00:00:00 2001 +From: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> +Date: Wed, 4 Apr 2018 21:55:21 +0300 +Subject: [PATCH v100500 9/9] UDL: add pseudo deferred io for modeset driver + +With blackjack and mud. +--- + drivers/gpu/drm/udl/udl_modeset.c | 42 +++++++++++++++++++++++++++++++++++++++ + 1 file changed, 42 insertions(+) + +diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl/udl_modeset.c +index 5bcae7649795..737471da16e4 100644 +--- a/drivers/gpu/drm/udl/udl_modeset.c ++++ b/drivers/gpu/drm/udl/udl_modeset.c +@@ -17,6 +17,45 @@ + #include <drm/drm_plane_helper.h> + #include "udl_drv.h" + ++/* All hacks and mud stuff --- start */ ++#define DL_DEFIO_WRITE_DELAY (HZ / 40) /* deferred_io delay in jiffies */ ++ ++static struct delayed_work deferred_work; ++static struct drm_device *deferred_dev; ++ ++static void pal_modeset_damage(struct drm_device *dev) ++{ ++ struct udl_device *udl = dev->dev_private; ++ struct udl_framebuffer *ufb; ++ ++ if (!udl->crtc || !udl->crtc->primary->fb) ++ return; ++ ++ ufb = to_udl_fb(udl->crtc->primary->fb); ++ udl_handle_damage(ufb, 0, 0, ufb->base.width, ufb->base.height); ++} ++ ++static void pal_deferred_io_work(struct work_struct *work) ++{ ++ pal_modeset_damage(deferred_dev); ++ schedule_delayed_work(&deferred_work, DL_DEFIO_WRITE_DELAY); ++} ++ ++static void pal_deferred_io_cleanup(void) ++{ ++ cancel_delayed_work_sync(&deferred_work); ++} ++ ++static void pal_deferred_io_init(struct drm_device *dev) ++{ ++ deferred_dev = dev; ++ ++ INIT_DELAYED_WORK(&deferred_work, pal_deferred_io_work); ++ ++ schedule_delayed_work(&deferred_work, DL_DEFIO_WRITE_DELAY); ++} ++/* All hacks and mud stuff --- end */ ++ + /* + * All DisplayLink bulk operations start with 0xAF, followed by specific code + * All operations are written to buffers which then later get sent to device +@@ -450,6 +489,8 @@ int udl_modeset_init(struct drm_device *dev) + + udl_connector_init(dev, encoder); + ++ pal_deferred_io_init(dev); ++ + return 0; + } + +@@ -467,5 +508,6 @@ void udl_modeset_restore(struct drm_device *dev) + + void udl_modeset_cleanup(struct drm_device *dev) + { ++ pal_deferred_io_cleanup(); + drm_mode_config_cleanup(dev); + } +-- +2.14.3 + |