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

Configure Feed

Select the types of activity you want to include in your feed.

drm/panel: novatek-nt36672a: 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.

Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Benni Steini <bennisteinir@gmail.com>
Cc: Marijn Suijten <marijn.suijten@somainline.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Maxime Ripard <mripard@kernel.org>
Tested-by: Joel Selvaraj <jo@jsfamily.in>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240503143327.RFT.v2.18.I13a06b9e6f5920659b1e5d12543b3cd9066383b8@changeid

-12
-12
drivers/gpu/drm/panel/panel-novatek-nt36672a.c
··· 72 72 struct regulator_bulk_data supplies[ARRAY_SIZE(nt36672a_regulator_names)]; 73 73 74 74 struct gpio_desc *reset_gpio; 75 - 76 - bool prepared; 77 75 }; 78 76 79 77 static inline struct nt36672a_panel *to_nt36672a_panel(struct drm_panel *panel) ··· 117 119 struct nt36672a_panel *pinfo = to_nt36672a_panel(panel); 118 120 int ret; 119 121 120 - if (!pinfo->prepared) 121 - return 0; 122 - 123 122 /* send off cmds */ 124 123 ret = nt36672a_send_cmds(panel, pinfo->desc->off_cmds, 125 124 pinfo->desc->num_off_cmds); ··· 141 146 ret = nt36672a_panel_power_off(panel); 142 147 if (ret < 0) 143 148 dev_err(panel->dev, "power_off failed ret = %d\n", ret); 144 - 145 - pinfo->prepared = false; 146 149 147 150 return ret; 148 151 } ··· 171 178 { 172 179 struct nt36672a_panel *pinfo = to_nt36672a_panel(panel); 173 180 int err; 174 - 175 - if (pinfo->prepared) 176 - return 0; 177 181 178 182 err = nt36672a_panel_power_on(pinfo); 179 183 if (err < 0) ··· 210 220 } 211 221 212 222 msleep(120); 213 - 214 - pinfo->prepared = true; 215 223 216 224 return 0; 217 225