Message ID | 20240511021326.288728-1-yangcong5@huaqin.corp-partner.google.com |
---|---|
Headers | show |
Series | Break out as separate driver and add BOE nv110wum-l60 IVO t109nw41 MIPI-DSI panel | expand |
Hi, On Fri, May 10, 2024 at 7:13 PM Cong Yang <yangcong5@huaqin.corp-partner.google.com> wrote: > > +static int hx83102_prepare(struct drm_panel *panel) > +{ > + struct hx83102 *ctx = panel_to_hx83102(panel); > + struct mipi_dsi_device *dsi = ctx->dsi; > + struct device *dev = &dsi->dev; > + int ret; > + > + gpiod_set_value(ctx->enable_gpio, 0); > + usleep_range(1000, 1500); > + > + ret = regulator_enable(ctx->pp1800); > + if (ret < 0) > + return ret; > + > + usleep_range(3000, 5000); > + > + ret = regulator_enable(ctx->avdd); > + if (ret < 0) > + goto poweroff1v8; > + ret = regulator_enable(ctx->avee); > + if (ret < 0) > + goto poweroffavdd; > + > + usleep_range(10000, 11000); > + > + mipi_dsi_dcs_nop(ctx->dsi); > + usleep_range(1000, 2000); > + > + gpiod_set_value(ctx->enable_gpio, 1); > + usleep_range(1000, 2000); > + gpiod_set_value(ctx->enable_gpio, 0); > + usleep_range(1000, 2000); > + gpiod_set_value(ctx->enable_gpio, 1); > + usleep_range(6000, 10000); > + > + ret = ctx->desc->init(ctx); > + if (ret < 0) > + goto poweroff; > + > + ret = mipi_dsi_dcs_exit_sleep_mode(dsi); > + if (ret) { > + dev_err(dev, "Failed to exit sleep mode: %d\n", ret); > + return ret; > + } The above should have been "goto poweroff", not "return ret". > + msleep(120); > + > + ret = mipi_dsi_dcs_set_display_on(dsi); > + if (ret) { > + dev_err(dev, "Failed to turn on the display: %d\n", ret); > + return ret; > + } The above should have been "goto poweroff", not "return ret". Other than that: Reviewed-by: Douglas Anderson <dianders@chromium.org>
Hi, On Fri, May 10, 2024 at 7:13 PM Cong Yang <yangcong5@huaqin.corp-partner.google.com> wrote: > > The BOE nv110wum-l60 is a 11.0" WUXGA TFT LCD panel, use hx83102 controller > which fits in nicely with the existing panel-himax-hx83102 driver. Hence, > we add a new compatible with panel specific config. > > Signed-off-by: Cong Yang <yangcong5@huaqin.corp-partner.google.com> > --- > Chage since V6: > > - No change. > > V5: https://lore.kernel.org/all/20240509015207.3271370-6-yangcong5@huaqin.corp-partner.google.com > > Chage since V5: > > - Adjust inital cmds indentation and check accum_err before calling mdelay in init().. > > V4: https://lore.kernel.org/all/20240507135234.1356855-6-yangcong5@huaqin.corp-partner.google.com > > Chage since V4: > > - Depend Dous'series [1]. > [1]: https://lore.kernel.org/all/20240501154251.3302887-1-dianders@chromium.org > > V3: https://lore.kernel.org/all/20240424023010.2099949-6-yangcong5@huaqin.corp-partner.google.com > > Chage since V3: > > - inital cmds use lowercasehex. > > V2: https://lore.kernel.org/all/20240422090310.3311429-6-yangcong5@huaqin.corp-partner.google.com > > --- > drivers/gpu/drm/panel/panel-himax-hx83102.c | 133 ++++++++++++++++++++ > 1 file changed, 133 insertions(+) Reviewed-by: Douglas Anderson <dianders@chromium.org>
Hi, On Fri, May 10, 2024 at 7:14 PM Cong Yang <yangcong5@huaqin.corp-partner.google.com> wrote: > > The IVO t109nw41 is a 11.0" WUXGA TFT LCD panel, use hx83102 controller > which fits in nicely with the existing panel-himax-hx83102 driver. Hence, > we add a new compatible with panel specific config. > > Signed-off-by: Cong Yang <yangcong5@huaqin.corp-partner.google.com> > --- > Chage since V6: > > - Add hx83102_enable_extended_cmds(&dsi_ctx, false) at end of inital cmds. > > V5: https://lore.kernel.org/all/20240509015207.3271370-8-yangcong5@huaqin.corp-partner.google.com > > Chage since V5: > > - Adjust inital cmds indentation and check accum_err before calling mdelay in init(). > - Adjust somes inital cmds to Optimize gamma. > > V4: https://lore.kernel.org/all/20240507135234.1356855-8-yangcong5@huaqin.corp-partner.google.com > > Chage since V4: > > - inital cmds use lowercasehex. > > V3: https://lore.kernel.org/all/20240424023010.2099949-8-yangcong5@huaqin.corp-partner.google.com > > Chage since V3: > > - Depend Dous'series [1]. > [1]: https://lore.kernel.org/all/20240501154251.3302887-1-dianders@chromium.org > > V2: https://lore.kernel.org/all/20240422090310.3311429-8-yangcong5@huaqin.corp-partner.google.com > > --- > drivers/gpu/drm/panel/panel-himax-hx83102.c | 131 ++++++++++++++++++++ > 1 file changed, 131 insertions(+) Reviewed-by: Douglas Anderson <dianders@chromium.org>
On Sat, May 11, 2024 at 4:13 AM Cong Yang <yangcong5@huaqin.corp-partner.google.com> wrote: > The Starry HX83102 based mipi panel should never have been part of the boe > tv101wum-n16 driver. Discussion with Doug and Linus in V1 [1], we need a > separate driver to enable the hx83102 controller. > > In hx83102 driver, add DSI commands as macros. So it can add some panels > with same control model in the future. > > In the old boe-tv101wum-nl6 driver inital cmds was invoked at the end of > prepare() function , and call 0x11 and 0x29 at end of inital. For > himax-hx83102 driver, we move 0x11 and 0x29 cmds invoked at prepare() > function. > > Note:0x11 is mipi_dsi_dcs_exit_sleep_mode > 0x29 is mipi_dsi_dcs_set_display_on > > [1]: https://lore.kernel.org/all/CACRpkdbzYZAS0=zBQJUC4CB2wj4s1h6n6aSAZQvdMV95r3zRUw@mail.gmail.com > > Signed-off-by: Cong Yang <yangcong5@huaqin.corp-partner.google.com> With Doug's comments addressed: Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Yours, Linus Walleij
On Sat, May 11, 2024 at 4:13 AM Cong Yang <yangcong5@huaqin.corp-partner.google.com> wrote: > The BOE nv110wum-l60 is a 11.0" WUXGA TFT LCD panel, use hx83102 controller > which fits in nicely with the existing panel-himax-hx83102 driver. Hence, > we add a new compatible with panel specific config. > > Signed-off-by: Cong Yang <yangcong5@huaqin.corp-partner.google.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Yours, Linus Walleij
On Sat, May 11, 2024 at 4:14 AM Cong Yang <yangcong5@huaqin.corp-partner.google.com> wrote: > The IVO t109nw41 is a 11.0" WUXGA TFT LCD panel, use hx83102 controller > which fits in nicely with the existing panel-himax-hx83102 driver. Hence, > we add a new compatible with panel specific config. > > Signed-off-by: Cong Yang <yangcong5@huaqin.corp-partner.google.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Yours, Linus Walleij