drm/panel-simple: Add Vivax TPC-9150 panel v5
Subsystems (4)
PATCH 1/1 drm/panel-simple: Add Vivax TPC-9150 panel v5
The model and make of the LCD panel of the Vivax TPC-9150 is unknown, hence the panel settings that were retrieved with a FEX dump are named after the device NOT the actual panel.
The LCD in question is a 50 pin MISO TFT LCD panel of the resolution 1024x600 used by the aforementioned device.
Version 2, as Thierry kindly suggested that I fix the order in which the panel was ordered compared to others.
Version 3, filling in the required info suggested by Sam. Plus some factual issues that I've corrected myself (tested working)
Version 4, rearranged the display parameters and fix invalid bit format issue. (Thanks Sam)
Version 5, referred to FEX file instead of manual debugging for information.
NOTE: Seperate dt-binding patch has been sent to THAT mailing list. So that's why they're NOT included here. Advise freely if that's not how you're supposed to do it.
Thanks,
Nikola
--- drivers/gpu/drm/panel/panel-simple.c | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+)
drivers/gpu/drm/panel/panel-simple.c +29 -0
@@ -4363,6 +4363,32 @@ static const struct panel_desc urt_umsh_8596md_parallel = { .bus_format = MEDIA_BUS_FMT_RGB666_1X18, }; +static const struct drm_display_mode vivax_tpc9150_panel_mode = { + .clock =60000 , + .hdisplay =1024 , + .hsync_start =1024 +160 , + .hsync_end =1024 +160 +100 , + .htotal =1024 +160 +100 +60 , + .vdisplay =600 , + .vsync_start =600 +12 , + .vsync_end =600 +12 +10 , + .vtotal =600 +12 +10 +13 , +}; + +static const struct panel_desc vivax_tpc9150_panel = { + .modes = &vivax_tpc9150_panel_mode, + .num_modes =1 , + .bpc =6 , + .size = { + .width =200 , + .height =115 , + }, + .bus_format =MEDIA_BUS_FMT_RGB888_1X24 , + .bus_flags =DRM_BUS_FLAG_DE_HIGH , + .connector_type =DRM_MODE_CONNECTOR_LVDS , +}; + +static const struct drm_display_mode vl050_8048nt_c01_mode = { .clock =33333 , .hdisplay =800 ,
@@ -4891,6 +4917,9 @@ static const struct of_device_id platform_of_match[] = { }, { .compatible = "urt,umsh-8596md-20t", .data = &urt_umsh_8596md_parallel, + }, { + .compatible = "vivax,tpc9150-panel", + .data = &vivax_tpc9150_panel, }, { .compatible = "vxt,vl050-8048nt-c01", .data = &vl050_8048nt_c01,
--
2.33.0
Hi Nikola,
Quoted 16 lines · Nikola Pavlica
The model and make of the LCD panel of the Vivax TPC-9150 is unknown, hence the panel settings that were retrieved with a FEX dump are named after the device NOT the actual panel.
The LCD in question is a 50 pin MISO TFT LCD panel of the resolution 1024x600 used by the aforementioned device.
Version 2, as Thierry kindly suggested that I fix the order in which the panel was ordered compared to others.
Version 3, filling in the required info suggested by Sam. Plus some factual issues that I've corrected myself (tested working)
Version 4, rearranged the display parameters and fix invalid bit format issue. (Thanks Sam)
Quoted 6 lines
Version 5, referred to FEX file instead of manual debugging for information.
NOTE: Seperate dt-binding patch has been sent to THAT mailing list. So that's why they're NOT included here. Advise freely if that's not how you're supposed to do it.
The preference is to keep all related patches in one series. In this case we cannot apply the panel patches before the dt-bindings patches for example.
It is mood in this case as I already applied the bindings patches.
Quoted 3 lines
Thanks,
Nikola
There is one detail to fix, see below.
Quoted 27 lines
Signed-off-by Nikola Pavlica <[email protected]>--- drivers/gpu/drm/panel/panel-simple.c | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+)drivers/gpu/drm/panel/panel-simple.c +13
-0@@ -4363,6 +4363,32 @@ static const struct panel_desc urt_umsh_8596md_parallel = { .bus_format = MEDIA_BUS_FMT_RGB666_1X18, }; +static const struct drm_display_mode vivax_tpc9150_panel_mode = { + .clock =60000 , + .hdisplay =1024 , + .hsync_start =1024 +160 , + .hsync_end =1024 +160 +100 , + .htotal =1024 +160 +100 +60 , + .vdisplay =600 , + .vsync_start =600 +12 , + .vsync_end =600 +12 +10 , + .vtotal =600 +12 +10 +13 , +}; + +static const struct panel_desc vivax_tpc9150_panel = {
drivers/gpu/drm/panel/panel-simple.c static const struct panel_desc urt_umsh_8596md_parallel = { · line 4388
Quoted 10 lines
drivers/gpu/drm/panel/panel-simple.c +10
-0+ .modes = &vivax_tpc9150_panel_mode, + .num_modes = 1, + .bpc = 6, + .size = { + .width = 200, + .height = 115, + }, + .bus_format = MEDIA_BUS_FMT_RGB888_1X24, + .bus_flags = DRM_BUS_FLAG_DE_HIGH, + .connector_type = DRM_MODE_CONNECTOR_LVDS,
The LVDS connector with a bpc og 6 only accpets the followingbus_format: MEDIA_BUS_FMT_RGB666_1X7X3_SPWG
See panel-simple.c panel_simple_probe() around line 612.
So either the bus_format is wrong, or the connector_type is wrong. Please fix and resend.
Sam