dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: DRI Development <dri-devel@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: [PATCH 8/8] drm/tiny/repaper: Drop edp->enabled
Date: Fri, 12 Jun 2020 18:00:56 +0200	[thread overview]
Message-ID: <20200612160056.2082681-8-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <20200612160056.2082681-1-daniel.vetter@ffwll.ch>

Same patch as the mipi-dbi one, atomic tracks this for us already, we
just have to check the right thing.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: "Noralf Trønnes" <noralf@tronnes.org>
---
 drivers/gpu/drm/tiny/repaper.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/tiny/repaper.c b/drivers/gpu/drm/tiny/repaper.c
index 08164e2a2d13..2e01cf0a9876 100644
--- a/drivers/gpu/drm/tiny/repaper.c
+++ b/drivers/gpu/drm/tiny/repaper.c
@@ -88,7 +88,6 @@ struct repaper_epd {
 	u8 *line_buffer;
 	void *current_frame;
 
-	bool enabled;
 	bool cleared;
 	bool partial;
 };
@@ -538,9 +537,6 @@ static int repaper_fb_dirty(struct drm_framebuffer *fb)
 	int idx, ret = 0;
 	u8 *buf = NULL;
 
-	if (!epd->enabled)
-		return 0;
-
 	if (!drm_dev_enter(fb->dev, &idx))
 		return -ENODEV;
 
@@ -786,7 +782,6 @@ static void repaper_pipe_enable(struct drm_simple_display_pipe *pipe,
 	 */
 	repaper_write_val(spi, 0x02, 0x04);
 
-	epd->enabled = true;
 	epd->partial = false;
 out_exit:
 	drm_dev_exit(idx);
@@ -805,13 +800,8 @@ static void repaper_pipe_disable(struct drm_simple_display_pipe *pipe)
 	 * unplug.
 	 */
 
-	if (!epd->enabled)
-		return;
-
 	DRM_DEBUG_DRIVER("\n");
 
-	epd->enabled = false;
-
 	/* Nothing frame */
 	for (line = 0; line < epd->height; line++)
 		repaper_one_line(epd, 0x7fffu, NULL, 0x00, NULL,
@@ -859,6 +849,9 @@ static void repaper_pipe_update(struct drm_simple_display_pipe *pipe,
 	struct drm_plane_state *state = pipe->plane.state;
 	struct drm_rect rect;
 
+	if (!pipe->crtc.state->active)
+		return;
+
 	if (drm_atomic_helper_damage_merged(old_state, state, &rect))
 		repaper_fb_dirty(state->fb);
 }
-- 
2.26.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2020-06-12 16:01 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-12 16:00 [PATCH 1/8] drm/atomic-helper: reset vblank on crtc reset Daniel Vetter
2020-06-12 16:00 ` [PATCH 2/8] drm/amdgpu: Use __drm_atomic_helper_crtc_reset Daniel Vetter
2020-06-12 17:24   ` Harry Wentland
2020-06-12 17:41     ` Alex Deucher
2020-07-02 18:21       ` Daniel Vetter
2020-06-12 16:00 ` [PATCH 3/8] drm/imx: " Daniel Vetter
2020-06-24  7:25   ` Daniel Vetter
2020-07-02  9:41     ` Daniel Vetter
2020-07-02 10:12       ` Philipp Zabel
2020-06-12 16:00 ` [PATCH 4/8] drm/mtk: " Daniel Vetter
2020-06-23 16:01   ` Chun-Kuang Hu
2020-06-12 16:00 ` [PATCH 5/8] drm/vc4: " Daniel Vetter
2020-06-24  8:49   ` Maxime Ripard
2020-06-12 16:00 ` [PATCH 6/8] drm/vmwgfx: " Daniel Vetter
2020-06-12 20:32   ` kernel test robot
2020-06-12 20:49   ` [PATCH] " Daniel Vetter
2020-06-22 14:31     ` Roland Scheidegger
2020-06-12 23:21   ` [PATCH 6/8] " kernel test robot
2020-06-12 16:00 ` [PATCH 7/8] drm/mipi-dbi: Remove ->enabled Daniel Vetter
2020-06-13 13:42   ` Noralf Trønnes
2020-06-13 18:47   ` David Lechner
2020-06-15 21:31   ` [Intel-gfx] " Emil Velikov
2020-06-16  6:50     ` Daniel Vetter
2020-06-16 13:54       ` Emil Velikov
2020-06-16 17:16         ` Daniel Vetter
2020-06-24  7:18           ` Daniel Vetter
2020-06-12 16:00 ` Daniel Vetter [this message]
2020-06-13 13:43   ` [PATCH 8/8] drm/tiny/repaper: Drop edp->enabled Noralf Trønnes
2020-06-24  7:15     ` Daniel Vetter
2020-06-24  9:42 ` [PATCH 1/8] drm/atomic-helper: reset vblank on crtc reset Maxime Ripard
2020-07-02 11:27 ` Laurent Pinchart
2020-07-02 11:40   ` Daniel Vetter
2020-08-06  6:43     ` Tetsuo Handa
2020-08-06  6:57       ` daniel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200612160056.2082681-8-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).