Commit e8411b7e authored by Daniel Vetter's avatar Daniel Vetter

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: default avatarNoralf Trønnes <noralf@tronnes.org>
Reviewed-by: default avatarEmil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
Cc: "Noralf Trønnes" <noralf@tronnes.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200612160056.2082681-8-daniel.vetter@ffwll.ch
parent ec971aaa
...@@ -88,7 +88,6 @@ struct repaper_epd { ...@@ -88,7 +88,6 @@ struct repaper_epd {
u8 *line_buffer; u8 *line_buffer;
void *current_frame; void *current_frame;
bool enabled;
bool cleared; bool cleared;
bool partial; bool partial;
}; };
...@@ -538,9 +537,6 @@ static int repaper_fb_dirty(struct drm_framebuffer *fb) ...@@ -538,9 +537,6 @@ static int repaper_fb_dirty(struct drm_framebuffer *fb)
int idx, ret = 0; int idx, ret = 0;
u8 *buf = NULL; u8 *buf = NULL;
if (!epd->enabled)
return 0;
if (!drm_dev_enter(fb->dev, &idx)) if (!drm_dev_enter(fb->dev, &idx))
return -ENODEV; return -ENODEV;
...@@ -786,7 +782,6 @@ static void repaper_pipe_enable(struct drm_simple_display_pipe *pipe, ...@@ -786,7 +782,6 @@ static void repaper_pipe_enable(struct drm_simple_display_pipe *pipe,
*/ */
repaper_write_val(spi, 0x02, 0x04); repaper_write_val(spi, 0x02, 0x04);
epd->enabled = true;
epd->partial = false; epd->partial = false;
out_exit: out_exit:
drm_dev_exit(idx); drm_dev_exit(idx);
...@@ -805,13 +800,8 @@ static void repaper_pipe_disable(struct drm_simple_display_pipe *pipe) ...@@ -805,13 +800,8 @@ static void repaper_pipe_disable(struct drm_simple_display_pipe *pipe)
* unplug. * unplug.
*/ */
if (!epd->enabled)
return;
DRM_DEBUG_DRIVER("\n"); DRM_DEBUG_DRIVER("\n");
epd->enabled = false;
/* Nothing frame */ /* Nothing frame */
for (line = 0; line < epd->height; line++) for (line = 0; line < epd->height; line++)
repaper_one_line(epd, 0x7fffu, NULL, 0x00, NULL, repaper_one_line(epd, 0x7fffu, NULL, 0x00, NULL,
...@@ -859,6 +849,9 @@ static void repaper_pipe_update(struct drm_simple_display_pipe *pipe, ...@@ -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_plane_state *state = pipe->plane.state;
struct drm_rect rect; struct drm_rect rect;
if (!pipe->crtc.state->active)
return;
if (drm_atomic_helper_damage_merged(old_state, state, &rect)) if (drm_atomic_helper_damage_merged(old_state, state, &rect))
repaper_fb_dirty(state->fb); repaper_fb_dirty(state->fb);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment