drm/panel-edp: Add eDP innolux panel support
PATCH v2 1/2 drm/panel-edp: Add eDP innolux panel support
Add support for the 14" innolux,n140hca-eac eDP panel.
--- drivers/gpu/drm/panel/panel-edp.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
drivers/gpu/drm/panel/panel-edp.c +26 -0
@@ -1355,6 +1355,29 @@ static const struct panel_desc innolux_n125hce_gn1 = { }, }; +static const struct display_timing innolux_n140hca_eac_timing = { + .pixelclock = {72600000 ,76420000 ,80240000 }, + .hactive = {1920 ,1920 ,1920 }, + .hfront_porch = {80 ,80 ,80 }, + .hback_porch = {190 ,190 ,190 }, + .hsync_len = {60 ,60 ,60 }, + .vactive = {1080 ,1080 ,1080 }, + .vfront_porch = {6 ,6 ,6 }, + .vback_porch = {38 ,38 ,38 }, + .vsync_len = {8 ,8 ,8 }, + .flags =DISPLAY_FLAGS_VSYNC_LOW |DISPLAY_FLAGS_HSYNC_LOW , +}; + +static const struct panel_desc innolux_n140hca_eac = { + .timings = &innolux_n140hca_eac_timing, + .num_timings =1 , + .bpc =6 , + .size = { + .width =309 , + .height =174 , + }, +}; +static const struct drm_display_mode innolux_p120zdg_bf1_mode = { .clock =206016 , .hdisplay =2160 ,
@@ -1775,6 +1798,9 @@ static const struct of_device_id platform_of_match[] = { }, { .compatible = "innolux,n125hce-gn1", .data = &innolux_n125hce_gn1, + }, { + .compatible = "innolux,n140hca-eac", + .data = &innolux_n140hca_eac, }, { .compatible = "innolux,p120zdg-bf1", .data = &innolux_p120zdg_bf1,
Signature · 1 line
2.25.1
Doug Anderson
reviewerHi,
Quoted 19 lines · Rex Nie
Add support for the 14" innolux,n140hca-eac eDP panel.
Signed-off-by Rex Nie <[email protected]>Acked-by Hsin-Yi Wang <[email protected]>--- drivers/gpu/drm/panel/panel-edp.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)drivers/gpu/drm/panel/panel-edp.c +2
-0@@ -1355,6 +1355,29 @@ static const struct panel_desc innolux_n125hce_gn1 = { }, }; +static const struct display_timing innolux_n140hca_eac_timing = { + .pixelclock = {72600000 ,76420000 ,80240000 },
drivers/gpu/drm/panel/panel-edp.c static const struct panel_desc innolux_n125hce_gn1 = { · line 1369
Quoted 10 lines
drivers/gpu/drm/panel/panel-edp.c +10
-0+ .hactive = { 1920, 1920, 1920 }, + .hfront_porch = { 80, 80, 80 }, + .hback_porch = { 190, 190, 190 }, + .hsync_len = { 60, 60, 60 }, + .vactive = { 1080, 1080, 1080 }, + .vfront_porch = { 6, 6, 6 }, + .vback_porch = { 38, 38, 38 }, + .vsync_len = { 8, 8, 8 }, + .flags = DISPLAY_FLAGS_VSYNC_LOW | DISPLAY_FLAGS_HSYNC_LOW, +};
A few questions:
1. If I'm doing my math right, you're saying that this panel runs at 30 Hz refresh rate. Truly? While I won't dismiss that as impossible, it feels unlikely. Specifically:
In [2]: 72600000 / ((1920 + 80 + 190 + 60) * (1080 + 6 + 38 + 8)) Out[2]: 28.50412249705536
In [3]: 80240000 / ((1920 + 80 + 190 + 60) * (1080 + 6 + 38 + 8)) Out[3]: 31.503729878288183
NOTE: I managed to dig up a datasheet for this panel and the datasheet I have shows it as a 60 Hz refresh rate panel.
2. You're using the "struct display_timing" here instead of the "struct drm_display_mode". That can be OK, but can I ask why exactly?
3. Are you sure you need to add this entry? Moving forward I'm trying to encourage people to use the generic "edp-panel". Mostly you'd want to add a hardcoded panel here if:
a) Devices have already shipped using hardcoded timings and we don't want to risk breaking something in the field with "edp-panel".
b) You're trying to support some eDP controller that can't handle the generic "edp-panel". In this case I'm OK with landing changes but I'd strongly encourage you to update the controller to handle things.
drivers/gpu/drm/panel/panel-edp.c static const struct panel_desc innolux_n125hce_gn1 = { · line 1374
Quoted 4 lines
drivers/gpu/drm/panel/panel-edp.c +4
-0+static const struct panel_desc innolux_n140hca_eac = { + .timings = &innolux_n140hca_eac_timing, + .num_timings =1 , + .bpc =6 ,
Is it really 6 bpc? The datasheet I dug up claims 16777216 colors which would be 8 bpc. The EDID from that same datasheet also claims 8 bpc.
drivers/gpu/drm/panel/panel-edp.c static const struct panel_desc innolux_n125hce_gn1 = { · line 1378
Quoted 4 lines
drivers/gpu/drm/panel/panel-edp.c +4
-0+ .size = { + .width = 309, + .height = 174, + },
Where are your delays? I know in old code these were hard to figure out from the panel spec, but the kernel doc comments now translate it into standard eDP terminology so this should be trivially easy for you to provide.