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

drm/panel: xinpeng-xpp055c272: Stop tracking prepared

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.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240503143327.RFT.v2.30.I2145be78ce28327f4588c2c21370f22fd79d28b8@changeid

-11
-11
drivers/gpu/drm/panel/panel-xinpeng-xpp055c272.c
··· 52 52 struct gpio_desc *reset_gpio; 53 53 struct regulator *vci; 54 54 struct regulator *iovcc; 55 - bool prepared; 56 55 }; 57 56 58 57 static inline struct xpp055c272 *panel_to_xpp055c272(struct drm_panel *panel) ··· 135 136 struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); 136 137 int ret; 137 138 138 - if (!ctx->prepared) 139 - return 0; 140 - 141 139 ret = mipi_dsi_dcs_set_display_off(dsi); 142 140 if (ret < 0) 143 141 dev_err(ctx->dev, "failed to set display off: %d\n", ret); ··· 148 152 regulator_disable(ctx->iovcc); 149 153 regulator_disable(ctx->vci); 150 154 151 - ctx->prepared = false; 152 - 153 155 return 0; 154 156 } 155 157 ··· 156 162 struct xpp055c272 *ctx = panel_to_xpp055c272(panel); 157 163 struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); 158 164 int ret; 159 - 160 - if (ctx->prepared) 161 - return 0; 162 165 163 166 dev_dbg(ctx->dev, "Resetting the panel\n"); 164 167 ret = regulator_enable(ctx->vci); ··· 199 208 } 200 209 201 210 msleep(50); 202 - 203 - ctx->prepared = true; 204 211 205 212 return 0; 206 213