lkml.org 
[lkml]   [2023]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 21/21] panel: startek-kd070fhfid015: add support of this display
Hi,

On 15/03/2023 16:59, Alexandre Mergnat wrote:
> Hi Neil,
>
> Le jeu. 9 mars 2023 à 15:51, Neil Armstrong
> <neil.armstrong@linaro.org> a écrit :
>>> +
>>> +#include <drm/drm_crtc.h>
>>
>> Is this include needed ?
>
> Seems not, I remove it.
>
>>> + struct gpio_desc *enable_gpio;
>>> + struct gpio_desc *reset_gpio;
>>> + struct gpio_desc *dcdc_en_gpio;
>>
>> Isn't this "DCDC" a regulator ???
>
> According to the panel datasheet, this is an input signal needed
> passing through TFT connector (PIN30):
> "Power IC supply enable, High active"

Ack, perhaps the name isn't the right one, or specify something like panel-dcdc.

>
>>> + /* Interface setting, video mode */
>>> + ret = mipi_dsi_generic_write(dsi,
>>> + (u8[]){DSI_REG_IS, 0x14, 0x08, 0x00, 0x22, 0x00}, 6);
>>> + if (ret < 0) {
>>> + dev_err(dev, "failed to set display interface setting: %d\n",
>>> + ret);
>>> + return ret;
>>> + }
>>
>> Use mipi_dsi_generic_write_seq(dsi, DSI_REG_IS, 0x14, 0x08, 0x00, 0x22, 0x00); instead,
>> it's simpler and doesn't need explicit return check.
>
> "mipi_dsi_generic_write_seq" doesn't exist but I will add it below
> "mipi_dsi_dcs_write_seq" in drm_mipi_dsi.h

It is now https://github.com/torvalds/linux/blob/master/include/drm/drm_mipi_dsi.h#L302 since a9015ce59320

> I must keep the return check to jump out of "stk_panel_init" if
> something goes wrong, but I can drop the error print.

The mipi_dsi_generic_write_seq & mipi_dsi_dcs_write_seq macros does the return check for free.

>
>>> +static int stk_panel_enable(struct drm_panel *panel)
>>> +{
>>> + struct stk_panel *stk = to_stk_panel(panel);
>>> +
>>> + if (stk->enabled)
>>> + return 0;
>>> +
>>> + backlight_enable(stk->backlight);
>>> +
>>> + stk->enabled = true;
>>> +
>>> + return 0;
>>> +}
>>
>> Is this really needed ? the backlight core will enable it automatically.
>
> Ok, it's managed by drm_panel.c driver.
> Then I can also remove stuff from stk_panel_disable.
>
>
> Regards,
> Alex

\
 
 \ /
  Last update: 2023-03-27 01:01    [W:0.040 / U:20.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site