Re: [PATCH v4 4/5] drm: panel: simple: Add BOE NV110WTM-N61

2020-11-29 Thread Sam Ravnborg
Hi Douglas,

On Mon, Nov 09, 2020 at 05:00:58PM -0800, Douglas Anderson wrote:
> Add support for the BOE NV110WTM-N61 panel.  The EDID lists two modes
> (one for 60 Hz refresh rate and one for 40 Hz), so we'll list both of
> them here.
> 
> Note that the panel datasheet requires 80 ms between HPD asserting and
> the backlight power being turned on.  We'll use the new timing
> constraints structure to do this cleanly.  This assumes that the
> backlight will be enabled _after_ the panel enable finishes.  This is
> how it works today and seems a sane assumption.
> 
> Signed-off-by: Douglas Anderson 

I applied the binding patch (bindings before driver patch),
and added the missing flags while applying this patch.
All to drm-misc-next.

Sam


Re: [PATCH v4 4/5] drm: panel: simple: Add BOE NV110WTM-N61

2020-11-09 Thread Doug Anderson
Hi,

On Mon, Nov 9, 2020 at 5:01 PM Douglas Anderson  wrote:
>
> Add support for the BOE NV110WTM-N61 panel.  The EDID lists two modes
> (one for 60 Hz refresh rate and one for 40 Hz), so we'll list both of
> them here.
>
> Note that the panel datasheet requires 80 ms between HPD asserting and
> the backlight power being turned on.  We'll use the new timing
> constraints structure to do this cleanly.  This assumes that the
> backlight will be enabled _after_ the panel enable finishes.  This is
> how it works today and seems a sane assumption.
>
> Signed-off-by: Douglas Anderson 
> ---
>
> Changes in v4:
> - Rebased atop changes in earlier patches.
>
> Changes in v2:
> - Adjust for shorter names in patch #1.
>
>  drivers/gpu/drm/panel/panel-simple.c | 46 
>  1 file changed, 46 insertions(+)
>
> diff --git a/drivers/gpu/drm/panel/panel-simple.c 
> b/drivers/gpu/drm/panel/panel-simple.c
> index a54f42cb3adc..9bb723696e94 100644
> --- a/drivers/gpu/drm/panel/panel-simple.c
> +++ b/drivers/gpu/drm/panel/panel-simple.c
> @@ -1396,6 +1396,49 @@ static const struct panel_desc boe_nv101wxmn51 = {
> },
>  };
>
> +static const struct drm_display_mode boe_nv110wtm_n61_modes[] = {
> +   {
> +   .clock = 207800,
> +   .hdisplay = 2160,
> +   .hsync_start = 2160 + 48,
> +   .hsync_end = 2160 + 48 + 32,
> +   .htotal = 2160 + 48 + 32 + 100,
> +   .vdisplay = 1440,
> +   .vsync_start = 1440 + 3,
> +   .vsync_end = 1440 + 3 + 6,
> +   .vtotal = 1440 + 3 + 6 + 31,
> +   },
> +   {
> +   .clock = 138500,
> +   .hdisplay = 2160,
> +   .hsync_start = 2160 + 48,
> +   .hsync_end = 2160 + 48 + 32,
> +   .htotal = 2160 + 48 + 32 + 100,
> +   .vdisplay = 1440,
> +   .vsync_start = 1440 + 3,
> +   .vsync_end = 1440 + 3 + 6,
> +   .vtotal = 1440 + 3 + 6 + 31,
> +   },

I can do it as a follow-up patch if there is no other reason to spin,
but I realized that I forgot to add:

.flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC,

...to both the 40 and 60 Hz modes to make it match what's in the EDID.
I'm also OK w/ it getting added by a maintainer when this lands if
that makes sense.

-Doug


[PATCH v4 4/5] drm: panel: simple: Add BOE NV110WTM-N61

2020-11-09 Thread Douglas Anderson
Add support for the BOE NV110WTM-N61 panel.  The EDID lists two modes
(one for 60 Hz refresh rate and one for 40 Hz), so we'll list both of
them here.

Note that the panel datasheet requires 80 ms between HPD asserting and
the backlight power being turned on.  We'll use the new timing
constraints structure to do this cleanly.  This assumes that the
backlight will be enabled _after_ the panel enable finishes.  This is
how it works today and seems a sane assumption.

Signed-off-by: Douglas Anderson 
---

Changes in v4:
- Rebased atop changes in earlier patches.

Changes in v2:
- Adjust for shorter names in patch #1.

 drivers/gpu/drm/panel/panel-simple.c | 46 
 1 file changed, 46 insertions(+)

diff --git a/drivers/gpu/drm/panel/panel-simple.c 
b/drivers/gpu/drm/panel/panel-simple.c
index a54f42cb3adc..9bb723696e94 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -1396,6 +1396,49 @@ static const struct panel_desc boe_nv101wxmn51 = {
},
 };
 
+static const struct drm_display_mode boe_nv110wtm_n61_modes[] = {
+   {
+   .clock = 207800,
+   .hdisplay = 2160,
+   .hsync_start = 2160 + 48,
+   .hsync_end = 2160 + 48 + 32,
+   .htotal = 2160 + 48 + 32 + 100,
+   .vdisplay = 1440,
+   .vsync_start = 1440 + 3,
+   .vsync_end = 1440 + 3 + 6,
+   .vtotal = 1440 + 3 + 6 + 31,
+   },
+   {
+   .clock = 138500,
+   .hdisplay = 2160,
+   .hsync_start = 2160 + 48,
+   .hsync_end = 2160 + 48 + 32,
+   .htotal = 2160 + 48 + 32 + 100,
+   .vdisplay = 1440,
+   .vsync_start = 1440 + 3,
+   .vsync_end = 1440 + 3 + 6,
+   .vtotal = 1440 + 3 + 6 + 31,
+   },
+};
+
+static const struct panel_desc boe_nv110wtm_n61 = {
+   .modes = boe_nv110wtm_n61_modes,
+   .num_modes = ARRAY_SIZE(boe_nv110wtm_n61_modes),
+   .bpc = 8,
+   .size = {
+   .width = 233,
+   .height = 155,
+   },
+   .delay = {
+   .hpd_absent_delay = 200,
+   .prepare_to_enable = 80,
+   .unprepare = 500,
+   },
+   .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
+   .bus_flags = DRM_BUS_FLAG_DATA_MSB_TO_LSB,
+   .connector_type = DRM_MODE_CONNECTOR_eDP,
+};
+
 /* Also used for boe_nv133fhm_n62 */
 static const struct drm_display_mode boe_nv133fhm_n61_modes = {
.clock = 147840,
@@ -4086,6 +4129,9 @@ static const struct of_device_id platform_of_match[] = {
}, {
.compatible = "boe,nv101wxmn51",
.data = _nv101wxmn51,
+   }, {
+   .compatible = "boe,nv110wtm-n61",
+   .data = _nv110wtm_n61,
}, {
.compatible = "boe,nv133fhm-n61",
.data = _nv133fhm_n61,
-- 
2.29.2.222.g5d2a92d10f8-goog