Re: [PATCH v2 2/2] drm/tinydrm: Make fb_dirty into a lower level hook

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/23/2018 10:35 AM, Ville Syrjala wrote:
From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

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 weel (Noralf)

Cc: "Noralf Trønnes" <noralf@xxxxxxxxxxx>
Cc: David Lechner <david@xxxxxxxxxxxxxx>
Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
Reviewed-by: Noralf Trønnes <noralf@xxxxxxxxxxx>
---
  drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c | 30 ++++++++++++++++++++++++++
  drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c    |  5 ++---
  drivers/gpu/drm/tinydrm/ili9225.c              | 23 ++++++--------------
  drivers/gpu/drm/tinydrm/mi0283qt.c             |  2 +-
  drivers/gpu/drm/tinydrm/mipi-dbi.c             | 30 ++++++++++----------------
  drivers/gpu/drm/tinydrm/repaper.c              | 28 ++++++++----------------
  drivers/gpu/drm/tinydrm/st7586.c               | 23 ++++++--------------
  drivers/gpu/drm/tinydrm/st7735r.c              |  2 +-
  include/drm/tinydrm/mipi-dbi.h                 |  4 +++-
  include/drm/tinydrm/tinydrm-helpers.h          |  5 +++++
  include/drm/tinydrm/tinydrm.h                  |  4 ++++
  11 files changed, 78 insertions(+), 78 deletions(-)

diff --git a/drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c b/drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c
index d1c3ce9ab294..dcd390163a4a 100644
--- a/drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c

...

diff --git a/include/drm/tinydrm/mipi-dbi.h b/include/drm/tinydrm/mipi-dbi.h
index 44e824af2ef6..b8ba58861986 100644
--- a/include/drm/tinydrm/mipi-dbi.h
+++ b/include/drm/tinydrm/mipi-dbi.h
@@ -67,7 +67,9 @@ int mipi_dbi_init(struct device *dev, struct mipi_dbi *mipi,
  		  const struct drm_simple_display_pipe_funcs *pipe_funcs,
  		  struct drm_driver *driver,
  		  const struct drm_display_mode *mode, unsigned int rotation);
-void mipi_dbi_enable_flush(struct mipi_dbi *mipi);
+void mipi_dbi_enable_flush(struct mipi_dbi *mipi,
+			   struct drm_crtc_state *crtc_state,
+			   struct drm_plane_state *plan_state);

s/plan_state/plane_state/

  void mipi_dbi_pipe_disable(struct drm_simple_display_pipe *pipe);
  void mipi_dbi_hw_reset(struct mipi_dbi *mipi);
  bool mipi_dbi_display_is_on(struct mipi_dbi *mipi);
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux