Skip to content

Commit

Permalink
drm: panel: ili9881: Correct symmetry on enable/disable return codes
Browse files Browse the repository at this point in the history
ili9881c_enable is always returning 0.

ili9881c_disable was returning the error code from
mipi_dsi_dcs_set_display_off.
If non-zero, the drm_panel framework will leave the panel marked as
enabled, and not run the enable hook next time around. That isn't
helpful, particularly as we're expecting unprepare to disable
resets and regulators.

Change ili9881c_disable to match enable in always returning 0.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
  • Loading branch information
6by9 committed Sep 13, 2024
1 parent 536f209 commit 724d2e5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
Original file line number Diff line number Diff line change
Expand Up @@ -1745,7 +1745,9 @@ static int ili9881c_disable(struct drm_panel *panel)
{
struct ili9881c *ctx = panel_to_ili9881c(panel);

return mipi_dsi_dcs_set_display_off(ctx->dsi);
mipi_dsi_dcs_set_display_off(ctx->dsi);

return 0;
}

static int ili9881c_unprepare(struct drm_panel *panel)
Expand Down

0 comments on commit 724d2e5

Please sign in to comment.