Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/panel: osd-osd101t2587-53ts: Stop tracking prepared/enabled

As talked about in commit d2aacaf07395 ("drm/panel: Check for already
prepared/enabled in drm_panel"), we want to remove needless code from
panel drivers that was storing and double-checking the
prepared/enabled state. Even if someone was relying on the
double-check before, that double-check is now in the core and not
needed in individual drivers.

Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20240604172305.v3.7.Ic7f6b4ae48027668940a756090cfc454645d3da4@changeid
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.7.Ic7f6b4ae48027668940a756090cfc454645d3da4@changeid

authored by

Douglas Anderson and committed by
Neil Armstrong
9a3f7eb7 16661a0d

+1 -26
+1 -26
drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.c
··· 21 21 22 22 struct regulator *supply; 23 23 24 - bool prepared; 25 - bool enabled; 26 - 27 24 const struct drm_display_mode *default_mode; 28 25 }; 29 26 ··· 34 37 struct osd101t2587_panel *osd101t2587 = ti_osd_panel(panel); 35 38 int ret; 36 39 37 - if (!osd101t2587->enabled) 38 - return 0; 39 - 40 40 ret = mipi_dsi_shutdown_peripheral(osd101t2587->dsi); 41 - 42 - osd101t2587->enabled = false; 43 41 44 42 return ret; 45 43 } ··· 43 51 { 44 52 struct osd101t2587_panel *osd101t2587 = ti_osd_panel(panel); 45 53 46 - if (!osd101t2587->prepared) 47 - return 0; 48 - 49 54 regulator_disable(osd101t2587->supply); 50 - osd101t2587->prepared = false; 51 55 52 56 return 0; 53 57 } ··· 51 63 static int osd101t2587_panel_prepare(struct drm_panel *panel) 52 64 { 53 65 struct osd101t2587_panel *osd101t2587 = ti_osd_panel(panel); 54 - int ret; 55 66 56 - if (osd101t2587->prepared) 57 - return 0; 58 - 59 - ret = regulator_enable(osd101t2587->supply); 60 - if (!ret) 61 - osd101t2587->prepared = true; 62 - 63 - return ret; 67 + return regulator_enable(osd101t2587->supply); 64 68 } 65 69 66 70 static int osd101t2587_panel_enable(struct drm_panel *panel) ··· 60 80 struct osd101t2587_panel *osd101t2587 = ti_osd_panel(panel); 61 81 int ret; 62 82 63 - if (osd101t2587->enabled) 64 - return 0; 65 - 66 83 ret = mipi_dsi_turn_on_peripheral(osd101t2587->dsi); 67 84 if (ret) 68 85 return ret; 69 - 70 - osd101t2587->enabled = true; 71 86 72 87 return ret; 73 88 }