Skip to content

Commit e8411b7

Browse files
committed
drm/tiny/repaper: Drop edp->enabled
Same patch as the mipi-dbi one, atomic tracks this for us already, we just have to check the right thing. Reviewed-by: Noralf Trønnes <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Cc: "Noralf Trønnes" <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent ec971aa commit e8411b7

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

drivers/gpu/drm/tiny/repaper.c

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ struct repaper_epd {
8888
u8 *line_buffer;
8989
void *current_frame;
9090

91-
bool enabled;
9291
bool cleared;
9392
bool partial;
9493
};
@@ -538,9 +537,6 @@ static int repaper_fb_dirty(struct drm_framebuffer *fb)
538537
int idx, ret = 0;
539538
u8 *buf = NULL;
540539

541-
if (!epd->enabled)
542-
return 0;
543-
544540
if (!drm_dev_enter(fb->dev, &idx))
545541
return -ENODEV;
546542

@@ -786,7 +782,6 @@ static void repaper_pipe_enable(struct drm_simple_display_pipe *pipe,
786782
*/
787783
repaper_write_val(spi, 0x02, 0x04);
788784

789-
epd->enabled = true;
790785
epd->partial = false;
791786
out_exit:
792787
drm_dev_exit(idx);
@@ -805,13 +800,8 @@ static void repaper_pipe_disable(struct drm_simple_display_pipe *pipe)
805800
* unplug.
806801
*/
807802

808-
if (!epd->enabled)
809-
return;
810-
811803
DRM_DEBUG_DRIVER("\n");
812804

813-
epd->enabled = false;
814-
815805
/* Nothing frame */
816806
for (line = 0; line < epd->height; line++)
817807
repaper_one_line(epd, 0x7fffu, NULL, 0x00, NULL,
@@ -859,6 +849,9 @@ static void repaper_pipe_update(struct drm_simple_display_pipe *pipe,
859849
struct drm_plane_state *state = pipe->plane.state;
860850
struct drm_rect rect;
861851

852+
if (!pipe->crtc.state->active)
853+
return;
854+
862855
if (drm_atomic_helper_damage_merged(old_state, state, &rect))
863856
repaper_fb_dirty(state->fb);
864857
}

0 commit comments

Comments
 (0)