diff mbox series

drm/panel-simple: Add Vivax TPC-9150 panel v3

Message ID 20210817163605.1077257-1-pavlica.nikola@gmail.com (mailing list archive)
State New, archived
Headers show
Series drm/panel-simple: Add Vivax TPC-9150 panel v3 | expand

Commit Message

Nikola Pavlica Aug. 17, 2021, 4:36 p.m. UTC
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)

Thanks,
Nikola

Signed-off-by: Nikola Pavlica <pavlica.nikola@gmail.com>
---
 drivers/gpu/drm/panel/panel-simple.c | 29 ++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

Comments

Nikola Pavlica Aug. 17, 2021, 4:39 p.m. UTC | #1
Apologies for the spammy emails, I didn't see Sam's comment on time.

On Tue, Aug 17, 2021 at 6:36 PM Nikola Pavlica <pavlica.nikola@gmail.com>
wrote:

> 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)
>
> Thanks,
> Nikola
>
> Signed-off-by: Nikola Pavlica <pavlica.nikola@gmail.com>
> ---
>  drivers/gpu/drm/panel/panel-simple.c | 29 ++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
>
> diff --git a/drivers/gpu/drm/panel/panel-simple.c
> b/drivers/gpu/drm/panel/panel-simple.c
> index 4e2dad314c79..f6b3e58c162b 100644
> --- a/drivers/gpu/drm/panel/panel-simple.c
> +++ b/drivers/gpu/drm/panel/panel-simple.c
> @@ -3989,6 +3989,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,
> +       .size = {
> +               .width = 200,
> +               .height = 115,
> +       },
> +       .bpc = 6,
> +       .bus_format = MEDIA_BUS_FMT_RGB666_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,
> @@ -4490,6 +4516,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.32.0
>
>
Sam Ravnborg Aug. 17, 2021, 5:41 p.m. UTC | #2
Hi Nikola,

thanks for the quick re-spin. There is still a few things that needs to
be addressed though. Sorry for not catching these the first time.

On Tue, Aug 17, 2021 at 06:36:05PM +0200, Nikola Pavlica wrote:
> 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
HEX dump?

> 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)
> 
> Thanks,
> Nikola
> 
> Signed-off-by: Nikola Pavlica <pavlica.nikola@gmail.com>
> ---
>  drivers/gpu/drm/panel/panel-simple.c | 29 ++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
> 
> diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
> index 4e2dad314c79..f6b3e58c162b 100644
> --- a/drivers/gpu/drm/panel/panel-simple.c
> +++ b/drivers/gpu/drm/panel/panel-simple.c
> @@ -3989,6 +3989,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,
Most panels put .bpc right above .size, so they follow the order in the
struct. This is bikeshedding but my OCD triggered here.

> +	.size = {
> +		.width = 200,
> +		.height = 115,
> +	},
> +	.bpc = 6,
> +	.bus_format = MEDIA_BUS_FMT_RGB666_1X24,
This does not build - I have no MEDIA_BUS_FMT_RGB666_1X24 in my kernel
(drm-misc-next).

With an LVDS connector and bpc equals 6 my bet is on: MEDIA_BUS_FMT_RGB666_1X7X3_SPWG
This is from looking at similar panels.


> +	.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,
> @@ -4490,6 +4516,9 @@ static const struct of_device_id platform_of_match[] = {
>  	}, {
>  		.compatible = "urt,umsh-8596md-20t",
>  		.data = &urt_umsh_8596md_parallel,
> +	}, {
> +		.compatible = "vivax,tpc9150-panel",
vivax is an unknown vendor, needs to be added to
Documentation/devicetree/bindings/vendor-prefixes.yaml in a separate
patch.

tpc9150-panel should be added to
Documentation/devicetree/bindings/display/panel/panel-simple.yaml
or at least I assume this is the file to add it to.
Again as a separate patch.

For the two binding related patches see
Documentation/devicetree/bindings/submitting-patches.rst

Sorry for making this difficult, but we need it done right.

	Sam
kernel test robot Aug. 17, 2021, 7:01 p.m. UTC | #3
Hi Nikola,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on drm-tip/drm-tip drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master v5.14-rc6 next-20210817]
[cannot apply to drm/drm-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Nikola-Pavlica/drm-panel-simple-Add-Vivax-TPC-9150-panel-v3/20210818-003804
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: arm-randconfig-r023-20210816 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/b3b8de24d73c21a6e689abb123326d84425c877b
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Nikola-Pavlica/drm-panel-simple-Add-Vivax-TPC-9150-panel-v3/20210818-003804
        git checkout b3b8de24d73c21a6e689abb123326d84425c877b
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash drivers/gpu/drm/panel/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/panel/panel-simple.c:4386:23: error: 'MEDIA_BUS_FMT_RGB666_1X24' undeclared here (not in a function); did you mean 'MEDIA_BUS_FMT_RGB666_1X18'?
    4386 |         .bus_format = MEDIA_BUS_FMT_RGB666_1X24,
         |                       ^~~~~~~~~~~~~~~~~~~~~~~~~
         |                       MEDIA_BUS_FMT_RGB666_1X18

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for QCOM_SCM
   Depends on (ARM || ARM64) && HAVE_ARM_SMCCC
   Selected by
   - ARM_QCOM_SPM_CPUIDLE && CPU_IDLE && (ARM || ARM64) && (ARCH_QCOM || COMPILE_TEST && !ARM64 && MMU


vim +4386 drivers/gpu/drm/panel/panel-simple.c

  4377	
  4378	static const struct panel_desc vivax_tpc9150_panel = {
  4379		.modes = &vivax_tpc9150_panel_mode,
  4380		.num_modes = 1,
  4381		.size = {
  4382			.width = 200,
  4383			.height = 115,
  4384		},
  4385		.bpc = 6,
> 4386		.bus_format = MEDIA_BUS_FMT_RGB666_1X24,
  4387		.bus_flags = DRM_BUS_FLAG_DE_HIGH,
  4388		.connector_type = DRM_MODE_CONNECTOR_LVDS,
  4389	};
  4390	
  4391	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
kernel test robot Aug. 17, 2021, 7:13 p.m. UTC | #4
Hi Nikola,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on drm-tip/drm-tip drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master v5.14-rc6 next-20210817]
[cannot apply to drm/drm-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Nikola-Pavlica/drm-panel-simple-Add-Vivax-TPC-9150-panel-v3/20210818-003804
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: arm64-randconfig-r025-20210816 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 2c6448cdc2f68f8c28fd0bd9404182b81306e6e6)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://github.com/0day-ci/linux/commit/b3b8de24d73c21a6e689abb123326d84425c877b
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Nikola-Pavlica/drm-panel-simple-Add-Vivax-TPC-9150-panel-v3/20210818-003804
        git checkout b3b8de24d73c21a6e689abb123326d84425c877b
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/gpu/drm/panel/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/panel/panel-simple.c:4386:16: error: use of undeclared identifier 'MEDIA_BUS_FMT_RGB666_1X24'
           .bus_format = MEDIA_BUS_FMT_RGB666_1X24,
                         ^
   1 error generated.


vim +/MEDIA_BUS_FMT_RGB666_1X24 +4386 drivers/gpu/drm/panel/panel-simple.c

  4377	
  4378	static const struct panel_desc vivax_tpc9150_panel = {
  4379		.modes = &vivax_tpc9150_panel_mode,
  4380		.num_modes = 1,
  4381		.size = {
  4382			.width = 200,
  4383			.height = 115,
  4384		},
  4385		.bpc = 6,
> 4386		.bus_format = MEDIA_BUS_FMT_RGB666_1X24,
  4387		.bus_flags = DRM_BUS_FLAG_DE_HIGH,
  4388		.connector_type = DRM_MODE_CONNECTOR_LVDS,
  4389	};
  4390	
  4391	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff mbox series

Patch

diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 4e2dad314c79..f6b3e58c162b 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -3989,6 +3989,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,
+	.size = {
+		.width = 200,
+		.height = 115,
+	},
+	.bpc = 6,
+	.bus_format = MEDIA_BUS_FMT_RGB666_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,
@@ -4490,6 +4516,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,