diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2018-03-23 16:35:09 +0100 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2018-03-28 18:19:32 +0200 |
commit | e85d30060eddccfcfbf7fdbd61a23cfbda05cc59 (patch) | |
tree | 01d01405b2a6e6ee8d656ac3a35aae1162ed021a /include/drm/tinydrm/tinydrm.h | |
parent | drm/simple-kms-helper: Plumb plane state to the enable hook (diff) | |
download | linux-e85d30060eddccfcfbf7fdbd61a23cfbda05cc59.tar.xz linux-e85d30060eddccfcfbf7fdbd61a23cfbda05cc59.zip |
drm/tinydrm: Make fb_dirty into a lower level hook
mipi_dbi_enable_flush() wants to call the fb->dirty() hook from the
bowels of the .atomic_enable() hook. That prevents us from taking the
plane mutex in fb->dirty() unless we also plumb down the acquire
context.
Instead it seems simpler to split the fb->dirty() into a tinydrm
specific lower level hook that can be called from
mipi_dbi_enable_flush() and from a generic higher level
tinydrm_fb_dirty() helper. As we don't have a tinydrm specific
vfuncs table we'll just stick it into tinydrm_device directly
for now.
v2: Deal with the fb->dirty() in tinydrm_display_pipe_update() as well (Noralf)
Cc: "Noralf Trønnes" <noralf@tronnes.org>
Cc: David Lechner <david@lechnology.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20180323153509.15287-1-ville.syrjala@linux.intel.com
Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
Tested-by: Noralf Trønnes <noralf@tronnes.org>
Diffstat (limited to 'include/drm/tinydrm/tinydrm.h')
-rw-r--r-- | include/drm/tinydrm/tinydrm.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/drm/tinydrm/tinydrm.h b/include/drm/tinydrm/tinydrm.h index 77a93ec577fd..6e2b960e25eb 100644 --- a/include/drm/tinydrm/tinydrm.h +++ b/include/drm/tinydrm/tinydrm.h @@ -26,6 +26,10 @@ struct tinydrm_device { struct drm_simple_display_pipe pipe; struct mutex dirty_lock; const struct drm_framebuffer_funcs *fb_funcs; + int (*fb_dirty)(struct drm_framebuffer *framebuffer, + struct drm_file *file_priv, unsigned flags, + unsigned color, struct drm_clip_rect *clips, + unsigned num_clips); }; static inline struct tinydrm_device * |