* [PATCH v6 0/5] Add a few panels and use correct modes
@ 2023-11-07 20:41 Hsin-Yi Wang
2023-11-07 20:41 ` [PATCH v6 1/5] drm/panel-edp: drm/panel-edp: Fix AUO B116XAK01 name and timing Hsin-Yi Wang
` (4 more replies)
0 siblings, 5 replies; 18+ messages in thread
From: Hsin-Yi Wang @ 2023-11-07 20:41 UTC (permalink / raw)
To: Douglas Anderson
Cc: Neil Armstrong, Jessica Zhang, Sam Ravnborg, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Daniel Vetter,
dri-devel, linux-kernel, stable
This series contains following patches:
1-2. Fix 2 panel naming and timing.
3. Add a few new generic edp panels.
4. Support a new quirk to override the mode read from edid
5. Only add hard-coded mode if both edid and hard-coded modes presents.
v1: https://patchwork.kernel.org/project/dri-devel/cover/20231101212604.1636517-1-hsinyi@chromium.org/
v2: https://patchwork.kernel.org/project/dri-devel/cover/20231102221309.1971910-1-hsinyi@chromium.org/
v3: https://patchwork.kernel.org/project/dri-devel/cover/20231106202718.2770821-1-hsinyi@chromium.org/
v4: https://patchwork.kernel.org/project/dri-devel/cover/20231106210337.2900034-1-hsinyi@chromium.org/
v5: https://patchwork.kernel.org/project/dri-devel/cover/20231107000023.2928195-1-hsinyi@chromium.org/
Hsin-Yi Wang (5):
drm/panel-edp: drm/panel-edp: Fix AUO B116XAK01 name and timing
drm/panel-edp: drm/panel-edp: Fix AUO B116XTN02 name
drm/panel-edp: drm/panel-edp: Add several generic edp panels
drm/panel-edp: Add override_edid_mode quirk for generic edp
drm/panel-edp: Avoid adding multiple preferred modes
drivers/gpu/drm/panel/panel-edp.c | 134 +++++++++++++++++++++++++++---
1 file changed, 122 insertions(+), 12 deletions(-)
--
2.42.0.869.gea05f2083d-goog
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH v6 1/5] drm/panel-edp: drm/panel-edp: Fix AUO B116XAK01 name and timing
2023-11-07 20:41 [PATCH v6 0/5] Add a few panels and use correct modes Hsin-Yi Wang
@ 2023-11-07 20:41 ` Hsin-Yi Wang
2023-11-08 15:35 ` Maxime Ripard
2023-11-10 0:17 ` Doug Anderson
2023-11-07 20:41 ` [PATCH v6 2/5] drm/panel-edp: drm/panel-edp: Fix AUO B116XTN02 name Hsin-Yi Wang
` (3 subsequent siblings)
4 siblings, 2 replies; 18+ messages in thread
From: Hsin-Yi Wang @ 2023-11-07 20:41 UTC (permalink / raw)
To: Douglas Anderson
Cc: Neil Armstrong, Jessica Zhang, Sam Ravnborg, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Daniel Vetter,
dri-devel, linux-kernel, stable
Rename AUO 0x405c B116XAK01 to B116XAK01.0 and adjust the timing of
auo_b116xak01: T3=200, T12=500, T7_max = 50 according to decoding edid
and datasheet.
Fixes: da458286a5e2 ("drm/panel: Add support for AUO B116XAK01 panel")
Cc: stable@vger.kernel.org
Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
---
v5->v6: split to 2 patches.
---
drivers/gpu/drm/panel/panel-edp.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/panel/panel-edp.c b/drivers/gpu/drm/panel/panel-edp.c
index 9dce4c702414..2fba7c1f49ce 100644
--- a/drivers/gpu/drm/panel/panel-edp.c
+++ b/drivers/gpu/drm/panel/panel-edp.c
@@ -973,6 +973,8 @@ static const struct panel_desc auo_b116xak01 = {
},
.delay = {
.hpd_absent = 200,
+ .unprepare = 500,
+ .enable = 50,
},
};
@@ -1870,7 +1872,7 @@ static const struct edp_panel_entry edp_panels[] = {
EDP_PANEL_ENTRY('A', 'U', 'O', 0x1e9b, &delay_200_500_e50, "B133UAN02.1"),
EDP_PANEL_ENTRY('A', 'U', 'O', 0x1ea5, &delay_200_500_e50, "B116XAK01.6"),
EDP_PANEL_ENTRY('A', 'U', 'O', 0x235c, &delay_200_500_e50, "B116XTN02"),
- EDP_PANEL_ENTRY('A', 'U', 'O', 0x405c, &auo_b116xak01.delay, "B116XAK01"),
+ EDP_PANEL_ENTRY('A', 'U', 'O', 0x405c, &auo_b116xak01.delay, "B116XAK01.0"),
EDP_PANEL_ENTRY('A', 'U', 'O', 0x582d, &delay_200_500_e50, "B133UAN01.0"),
EDP_PANEL_ENTRY('A', 'U', 'O', 0x615c, &delay_200_500_e50, "B116XAN06.1"),
EDP_PANEL_ENTRY('A', 'U', 'O', 0x8594, &delay_200_500_e50, "B133UAN01.0"),
--
2.42.0.869.gea05f2083d-goog
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH v6 2/5] drm/panel-edp: drm/panel-edp: Fix AUO B116XTN02 name
2023-11-07 20:41 [PATCH v6 0/5] Add a few panels and use correct modes Hsin-Yi Wang
2023-11-07 20:41 ` [PATCH v6 1/5] drm/panel-edp: drm/panel-edp: Fix AUO B116XAK01 name and timing Hsin-Yi Wang
@ 2023-11-07 20:41 ` Hsin-Yi Wang
2023-11-08 15:35 ` Maxime Ripard
2023-11-10 0:18 ` Doug Anderson
2023-11-07 20:41 ` [PATCH v6 3/5] drm/panel-edp: drm/panel-edp: Add several generic edp panels Hsin-Yi Wang
` (2 subsequent siblings)
4 siblings, 2 replies; 18+ messages in thread
From: Hsin-Yi Wang @ 2023-11-07 20:41 UTC (permalink / raw)
To: Douglas Anderson
Cc: Neil Armstrong, Jessica Zhang, Sam Ravnborg, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Daniel Vetter,
dri-devel, linux-kernel, stable
Rename AUO 0x235c B116XTN02 to B116XTN02.3 according to decoding edid.
Fixes: 3db2420422a5 ("drm/panel-edp: Add AUO B116XTN02, BOE NT116WHM-N21,836X2, NV116WHM-N49 V8.0")
Cc: stable@vger.kernel.org
Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
---
v5->v6: split to 2 patches.
---
drivers/gpu/drm/panel/panel-edp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/panel/panel-edp.c b/drivers/gpu/drm/panel/panel-edp.c
index 2fba7c1f49ce..d41d205f7f5b 100644
--- a/drivers/gpu/drm/panel/panel-edp.c
+++ b/drivers/gpu/drm/panel/panel-edp.c
@@ -1871,7 +1871,7 @@ static const struct edp_panel_entry edp_panels[] = {
EDP_PANEL_ENTRY('A', 'U', 'O', 0x145c, &delay_200_500_e50, "B116XAB01.4"),
EDP_PANEL_ENTRY('A', 'U', 'O', 0x1e9b, &delay_200_500_e50, "B133UAN02.1"),
EDP_PANEL_ENTRY('A', 'U', 'O', 0x1ea5, &delay_200_500_e50, "B116XAK01.6"),
- EDP_PANEL_ENTRY('A', 'U', 'O', 0x235c, &delay_200_500_e50, "B116XTN02"),
+ EDP_PANEL_ENTRY('A', 'U', 'O', 0x235c, &delay_200_500_e50, "B116XTN02.3"),
EDP_PANEL_ENTRY('A', 'U', 'O', 0x405c, &auo_b116xak01.delay, "B116XAK01.0"),
EDP_PANEL_ENTRY('A', 'U', 'O', 0x582d, &delay_200_500_e50, "B133UAN01.0"),
EDP_PANEL_ENTRY('A', 'U', 'O', 0x615c, &delay_200_500_e50, "B116XAN06.1"),
--
2.42.0.869.gea05f2083d-goog
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH v6 3/5] drm/panel-edp: drm/panel-edp: Add several generic edp panels
2023-11-07 20:41 [PATCH v6 0/5] Add a few panels and use correct modes Hsin-Yi Wang
2023-11-07 20:41 ` [PATCH v6 1/5] drm/panel-edp: drm/panel-edp: Fix AUO B116XAK01 name and timing Hsin-Yi Wang
2023-11-07 20:41 ` [PATCH v6 2/5] drm/panel-edp: drm/panel-edp: Fix AUO B116XTN02 name Hsin-Yi Wang
@ 2023-11-07 20:41 ` Hsin-Yi Wang
2023-11-07 20:57 ` Greg KH
` (2 more replies)
2023-11-07 20:41 ` [PATCH v6 4/5] drm/panel-edp: Add override_edid_mode quirk for generic edp Hsin-Yi Wang
2023-11-07 20:41 ` [PATCH v6 5/5] drm/panel-edp: Avoid adding multiple preferred modes Hsin-Yi Wang
4 siblings, 3 replies; 18+ messages in thread
From: Hsin-Yi Wang @ 2023-11-07 20:41 UTC (permalink / raw)
To: Douglas Anderson
Cc: Neil Armstrong, Jessica Zhang, Sam Ravnborg, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Daniel Vetter,
dri-devel, linux-kernel, stable
Add a few generic edp panels used by mt8186 chromebooks.
Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
---
no change.
---
drivers/gpu/drm/panel/panel-edp.c | 51 +++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/drivers/gpu/drm/panel/panel-edp.c b/drivers/gpu/drm/panel/panel-edp.c
index d41d205f7f5b..599a949d74d1 100644
--- a/drivers/gpu/drm/panel/panel-edp.c
+++ b/drivers/gpu/drm/panel/panel-edp.c
@@ -1832,6 +1832,12 @@ static const struct panel_delay delay_200_500_e50 = {
.enable = 50,
};
+static const struct panel_delay delay_200_500_e80 = {
+ .hpd_absent = 200,
+ .unprepare = 500,
+ .enable = 80,
+};
+
static const struct panel_delay delay_200_500_e80_d50 = {
.hpd_absent = 200,
.unprepare = 500,
@@ -1851,6 +1857,19 @@ static const struct panel_delay delay_200_500_e200 = {
.enable = 200,
};
+static const struct panel_delay delay_200_500_e200_d10 = {
+ .hpd_absent = 200,
+ .unprepare = 500,
+ .enable = 200,
+ .disable = 10,
+};
+
+static const struct panel_delay delay_200_150_e200 = {
+ .hpd_absent = 200,
+ .unprepare = 150,
+ .enable = 200,
+};
+
#define EDP_PANEL_ENTRY(vend_chr_0, vend_chr_1, vend_chr_2, product_id, _delay, _name) \
{ \
.name = _name, \
@@ -1871,37 +1890,69 @@ static const struct edp_panel_entry edp_panels[] = {
EDP_PANEL_ENTRY('A', 'U', 'O', 0x145c, &delay_200_500_e50, "B116XAB01.4"),
EDP_PANEL_ENTRY('A', 'U', 'O', 0x1e9b, &delay_200_500_e50, "B133UAN02.1"),
EDP_PANEL_ENTRY('A', 'U', 'O', 0x1ea5, &delay_200_500_e50, "B116XAK01.6"),
+ EDP_PANEL_ENTRY('A', 'U', 'O', 0x208d, &delay_200_500_e50, "B140HTN02.1"),
EDP_PANEL_ENTRY('A', 'U', 'O', 0x235c, &delay_200_500_e50, "B116XTN02.3"),
+ EDP_PANEL_ENTRY('A', 'U', 'O', 0x239b, &delay_200_500_e50, "B116XAN06.1"),
+ EDP_PANEL_ENTRY('A', 'U', 'O', 0x255c, &delay_200_500_e50, "B116XTN02.5"),
+ EDP_PANEL_ENTRY('A', 'U', 'O', 0x403d, &delay_200_500_e50, "B140HAN04.0"),
EDP_PANEL_ENTRY('A', 'U', 'O', 0x405c, &auo_b116xak01.delay, "B116XAK01.0"),
EDP_PANEL_ENTRY('A', 'U', 'O', 0x582d, &delay_200_500_e50, "B133UAN01.0"),
EDP_PANEL_ENTRY('A', 'U', 'O', 0x615c, &delay_200_500_e50, "B116XAN06.1"),
+ EDP_PANEL_ENTRY('A', 'U', 'O', 0x635c, &delay_200_500_e50, "B116XAN06.3"),
+ EDP_PANEL_ENTRY('A', 'U', 'O', 0x639c, &delay_200_500_e50, "B140HAK02.7"),
EDP_PANEL_ENTRY('A', 'U', 'O', 0x8594, &delay_200_500_e50, "B133UAN01.0"),
+ EDP_PANEL_ENTRY('A', 'U', 'O', 0xf390, &delay_200_500_e50, "B140XTN07.7"),
+ EDP_PANEL_ENTRY('B', 'O', 'E', 0x0715, &delay_200_150_e200, "NT116WHM-N21"),
+ EDP_PANEL_ENTRY('B', 'O', 'E', 0x0731, &delay_200_500_e80, "NT116WHM-N42"),
+ EDP_PANEL_ENTRY('B', 'O', 'E', 0x0741, &delay_200_500_e200, "NT116WHM-N44"),
EDP_PANEL_ENTRY('B', 'O', 'E', 0x0786, &delay_200_500_p2e80, "NV116WHM-T01"),
EDP_PANEL_ENTRY('B', 'O', 'E', 0x07d1, &boe_nv133fhm_n61.delay, "NV133FHM-N61"),
+ EDP_PANEL_ENTRY('B', 'O', 'E', 0x07f6, &delay_200_500_e200, "NT140FHM-N44"),
EDP_PANEL_ENTRY('B', 'O', 'E', 0x082d, &boe_nv133fhm_n61.delay, "NV133FHM-N62"),
+ EDP_PANEL_ENTRY('B', 'O', 'E', 0x08b2, &delay_200_500_e200, "NT140WHM-N49"),
EDP_PANEL_ENTRY('B', 'O', 'E', 0x09c3, &delay_200_500_e50, "NT116WHM-N21,836X2"),
EDP_PANEL_ENTRY('B', 'O', 'E', 0x094b, &delay_200_500_e50, "NT116WHM-N21"),
+ EDP_PANEL_ENTRY('B', 'O', 'E', 0x0951, &delay_200_500_e80, "NV116WHM-N47"),
EDP_PANEL_ENTRY('B', 'O', 'E', 0x095f, &delay_200_500_e50, "NE135FBM-N41 v8.1"),
EDP_PANEL_ENTRY('B', 'O', 'E', 0x0979, &delay_200_500_e50, "NV116WHM-N49 V8.0"),
EDP_PANEL_ENTRY('B', 'O', 'E', 0x098d, &boe_nv110wtm_n61.delay, "NV110WTM-N61"),
+ EDP_PANEL_ENTRY('B', 'O', 'E', 0x09ae, &delay_200_500_e200, "NT140FHM-N45"),
EDP_PANEL_ENTRY('B', 'O', 'E', 0x09dd, &delay_200_500_e50, "NT116WHM-N21"),
EDP_PANEL_ENTRY('B', 'O', 'E', 0x0a5d, &delay_200_500_e50, "NV116WHM-N45"),
EDP_PANEL_ENTRY('B', 'O', 'E', 0x0ac5, &delay_200_500_e50, "NV116WHM-N4C"),
+ EDP_PANEL_ENTRY('B', 'O', 'E', 0x0b43, &delay_200_500_e200, "NV140FHM-T09"),
+ EDP_PANEL_ENTRY('B', 'O', 'E', 0x0b56, &delay_200_500_e80, "NT140FHM-N47"),
+ EDP_PANEL_ENTRY('B', 'O', 'E', 0x0c20, &delay_200_500_e80, "NT140FHM-N47"),
+ EDP_PANEL_ENTRY('C', 'M', 'N', 0x1132, &delay_200_500_e80_d50, "N116BGE-EA2"),
+ EDP_PANEL_ENTRY('C', 'M', 'N', 0x1138, &innolux_n116bca_ea1.delay, "N116BCA-EA1-RC4"),
EDP_PANEL_ENTRY('C', 'M', 'N', 0x1139, &delay_200_500_e80_d50, "N116BGE-EA2"),
+ EDP_PANEL_ENTRY('C', 'M', 'N', 0x1145, &delay_200_500_e80_d50, "N116BCN-EB1"),
EDP_PANEL_ENTRY('C', 'M', 'N', 0x114c, &innolux_n116bca_ea1.delay, "N116BCA-EA1"),
EDP_PANEL_ENTRY('C', 'M', 'N', 0x1152, &delay_200_500_e80_d50, "N116BCN-EA1"),
EDP_PANEL_ENTRY('C', 'M', 'N', 0x1153, &delay_200_500_e80_d50, "N116BGE-EA2"),
EDP_PANEL_ENTRY('C', 'M', 'N', 0x1154, &delay_200_500_e80_d50, "N116BCA-EA2"),
+ EDP_PANEL_ENTRY('C', 'M', 'N', 0x1157, &delay_200_500_e80_d50, "N116BGE-EA2"),
+ EDP_PANEL_ENTRY('C', 'M', 'N', 0x115b, &delay_200_500_e80_d50, "N116BCN-EB1"),
EDP_PANEL_ENTRY('C', 'M', 'N', 0x1247, &delay_200_500_e80_d50, "N120ACA-EA1"),
+ EDP_PANEL_ENTRY('C', 'M', 'N', 0x142b, &delay_200_500_e80_d50, "N140HCA-EAC"),
+ EDP_PANEL_ENTRY('C', 'M', 'N', 0x144f, &delay_200_500_e80_d50, "N140HGA-EA1"),
+ EDP_PANEL_ENTRY('C', 'M', 'N', 0x1468, &delay_200_500_e80, "N140HGA-EA1"),
+ EDP_PANEL_ENTRY('C', 'M', 'N', 0x14e5, &delay_200_500_e80_d50, "N140HGA-EA1"),
EDP_PANEL_ENTRY('C', 'M', 'N', 0x14d4, &delay_200_500_e80_d50, "N140HCA-EAC"),
+ EDP_PANEL_ENTRY('C', 'M', 'N', 0x14d6, &delay_200_500_e80_d50, "N140BGA-EA4"),
+
+ EDP_PANEL_ENTRY('H', 'K', 'C', 0x2d5c, &delay_200_500_e200, "MB116AN01-2"),
+ EDP_PANEL_ENTRY('I', 'V', 'O', 0x048e, &delay_200_500_e200_d10, "M116NWR6 R5"),
EDP_PANEL_ENTRY('I', 'V', 'O', 0x057d, &delay_200_500_e200, "R140NWF5 RH"),
EDP_PANEL_ENTRY('I', 'V', 'O', 0x854a, &delay_200_500_p2e100, "M133NW4J"),
EDP_PANEL_ENTRY('I', 'V', 'O', 0x854b, &delay_200_500_p2e100, "R133NW4K-R0"),
+ EDP_PANEL_ENTRY('I', 'V', 'O', 0x8c4d, &delay_200_150_e200, "R140NWFM R1"),
EDP_PANEL_ENTRY('K', 'D', 'B', 0x0624, &kingdisplay_kd116n21_30nv_a010.delay, "116N21-30NV-A010"),
+ EDP_PANEL_ENTRY('K', 'D', 'C', 0x0809, &delay_200_500_e50, "KD116N2930A15"),
EDP_PANEL_ENTRY('K', 'D', 'B', 0x1120, &delay_200_500_e80_d50, "116N29-30NK-C007"),
EDP_PANEL_ENTRY('S', 'H', 'P', 0x1511, &delay_200_500_e50, "LQ140M1JW48"),
--
2.42.0.869.gea05f2083d-goog
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH v6 4/5] drm/panel-edp: Add override_edid_mode quirk for generic edp
2023-11-07 20:41 [PATCH v6 0/5] Add a few panels and use correct modes Hsin-Yi Wang
` (2 preceding siblings ...)
2023-11-07 20:41 ` [PATCH v6 3/5] drm/panel-edp: drm/panel-edp: Add several generic edp panels Hsin-Yi Wang
@ 2023-11-07 20:41 ` Hsin-Yi Wang
2023-11-07 20:58 ` Greg KH
2023-11-08 15:45 ` Maxime Ripard
2023-11-07 20:41 ` [PATCH v6 5/5] drm/panel-edp: Avoid adding multiple preferred modes Hsin-Yi Wang
4 siblings, 2 replies; 18+ messages in thread
From: Hsin-Yi Wang @ 2023-11-07 20:41 UTC (permalink / raw)
To: Douglas Anderson
Cc: Neil Armstrong, Jessica Zhang, Sam Ravnborg, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Daniel Vetter,
dri-devel, linux-kernel, stable
Generic edp gets mode from edid. However, some panels report incorrect
mode in this way, resulting in glitches on panel. Introduce a new quirk
additional_mode to the generic edid to pick a correct hardcoded mode.
Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
---
no change.
---
drivers/gpu/drm/panel/panel-edp.c | 67 ++++++++++++++++++++++++++++---
1 file changed, 62 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-edp.c b/drivers/gpu/drm/panel/panel-edp.c
index 599a949d74d1..c0c24d94c3a0 100644
--- a/drivers/gpu/drm/panel/panel-edp.c
+++ b/drivers/gpu/drm/panel/panel-edp.c
@@ -203,6 +203,9 @@ struct edp_panel_entry {
/** @name: Name of this panel (for printing to logs). */
const char *name;
+
+ /** @override_edid_mode: Override the mode obtained by edid. */
+ const struct drm_display_mode *override_edid_mode;
};
struct panel_edp {
@@ -301,6 +304,24 @@ static unsigned int panel_edp_get_display_modes(struct panel_edp *panel,
return num;
}
+static int panel_edp_override_edid_mode(struct panel_edp *panel,
+ struct drm_connector *connector,
+ const struct drm_display_mode *override_mode)
+{
+ struct drm_display_mode *mode;
+
+ mode = drm_mode_duplicate(connector->dev, override_mode);
+ if (!mode) {
+ dev_err(panel->base.dev, "failed to add additional mode\n");
+ return 0;
+ }
+
+ mode->type |= DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
+ drm_mode_set_name(mode);
+ drm_mode_probed_add(connector, mode);
+ return 1;
+}
+
static int panel_edp_get_non_edid_modes(struct panel_edp *panel,
struct drm_connector *connector)
{
@@ -568,6 +589,9 @@ static int panel_edp_get_modes(struct drm_panel *panel,
{
struct panel_edp *p = to_panel_edp(panel);
int num = 0;
+ bool has_override_edid_mode = p->detected_panel &&
+ p->detected_panel != ERR_PTR(-EINVAL) &&
+ p->detected_panel->override_edid_mode;
/* probe EDID if a DDC bus is available */
if (p->ddc) {
@@ -575,9 +599,18 @@ static int panel_edp_get_modes(struct drm_panel *panel,
if (!p->edid)
p->edid = drm_get_edid(connector, p->ddc);
-
- if (p->edid)
- num += drm_add_edid_modes(connector, p->edid);
+ if (p->edid) {
+ if (has_override_edid_mode) {
+ /*
+ * override_edid_mode is specified. Use
+ * override_edid_mode instead of from edid.
+ */
+ num += panel_edp_override_edid_mode(p, connector,
+ p->detected_panel->override_edid_mode);
+ } else {
+ num += drm_add_edid_modes(connector, p->edid);
+ }
+ }
pm_runtime_mark_last_busy(panel->dev);
pm_runtime_put_autosuspend(panel->dev);
@@ -950,6 +983,19 @@ static const struct panel_desc auo_b101ean01 = {
},
};
+static const struct drm_display_mode auo_b116xa3_mode = {
+ .clock = 70589,
+ .hdisplay = 1366,
+ .hsync_start = 1366 + 40,
+ .hsync_end = 1366 + 40 + 40,
+ .htotal = 1366 + 40 + 40 + 32,
+ .vdisplay = 768,
+ .vsync_start = 768 + 10,
+ .vsync_end = 768 + 10 + 12,
+ .vtotal = 768 + 10 + 12 + 6,
+ .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
+};
+
static const struct drm_display_mode auo_b116xak01_mode = {
.clock = 69300,
.hdisplay = 1366,
@@ -1878,6 +1924,15 @@ static const struct panel_delay delay_200_150_e200 = {
.delay = _delay \
}
+#define EDP_PANEL_ENTRY2(vend_chr_0, vend_chr_1, vend_chr_2, product_id, _delay, _name, _mode) \
+{ \
+ .name = _name, \
+ .panel_id = drm_edid_encode_panel_id(vend_chr_0, vend_chr_1, vend_chr_2, \
+ product_id), \
+ .delay = _delay, \
+ .override_edid_mode = _mode \
+}
+
/*
* This table is used to figure out power sequencing delays for panels that
* are detected by EDID. Entries here may point to entries in the
@@ -1895,9 +1950,11 @@ static const struct edp_panel_entry edp_panels[] = {
EDP_PANEL_ENTRY('A', 'U', 'O', 0x239b, &delay_200_500_e50, "B116XAN06.1"),
EDP_PANEL_ENTRY('A', 'U', 'O', 0x255c, &delay_200_500_e50, "B116XTN02.5"),
EDP_PANEL_ENTRY('A', 'U', 'O', 0x403d, &delay_200_500_e50, "B140HAN04.0"),
- EDP_PANEL_ENTRY('A', 'U', 'O', 0x405c, &auo_b116xak01.delay, "B116XAK01.0"),
+ EDP_PANEL_ENTRY2('A', 'U', 'O', 0x405c, &auo_b116xak01.delay, "B116XAK01.0",
+ &auo_b116xa3_mode),
EDP_PANEL_ENTRY('A', 'U', 'O', 0x582d, &delay_200_500_e50, "B133UAN01.0"),
- EDP_PANEL_ENTRY('A', 'U', 'O', 0x615c, &delay_200_500_e50, "B116XAN06.1"),
+ EDP_PANEL_ENTRY2('A', 'U', 'O', 0x615c, &delay_200_500_e50, "B116XAN06.1",
+ &auo_b116xa3_mode),
EDP_PANEL_ENTRY('A', 'U', 'O', 0x635c, &delay_200_500_e50, "B116XAN06.3"),
EDP_PANEL_ENTRY('A', 'U', 'O', 0x639c, &delay_200_500_e50, "B140HAK02.7"),
EDP_PANEL_ENTRY('A', 'U', 'O', 0x8594, &delay_200_500_e50, "B133UAN01.0"),
--
2.42.0.869.gea05f2083d-goog
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH v6 5/5] drm/panel-edp: Avoid adding multiple preferred modes
2023-11-07 20:41 [PATCH v6 0/5] Add a few panels and use correct modes Hsin-Yi Wang
` (3 preceding siblings ...)
2023-11-07 20:41 ` [PATCH v6 4/5] drm/panel-edp: Add override_edid_mode quirk for generic edp Hsin-Yi Wang
@ 2023-11-07 20:41 ` Hsin-Yi Wang
4 siblings, 0 replies; 18+ messages in thread
From: Hsin-Yi Wang @ 2023-11-07 20:41 UTC (permalink / raw)
To: Douglas Anderson
Cc: Neil Armstrong, Jessica Zhang, Sam Ravnborg, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Daniel Vetter,
dri-devel, linux-kernel, stable
If a non generic edp-panel is under aux-bus, the mode read from edid would
still be selected as preferred and results in multiple preferred modes,
which is ambiguous.
If both hard-coded mode and edid exists, only add mode from hard-coded.
Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
---
no change.
---
drivers/gpu/drm/panel/panel-edp.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-edp.c b/drivers/gpu/drm/panel/panel-edp.c
index c0c24d94c3a0..006939cc3fee 100644
--- a/drivers/gpu/drm/panel/panel-edp.c
+++ b/drivers/gpu/drm/panel/panel-edp.c
@@ -589,6 +589,7 @@ static int panel_edp_get_modes(struct drm_panel *panel,
{
struct panel_edp *p = to_panel_edp(panel);
int num = 0;
+ bool has_hard_coded_modes = p->desc->num_timings || p->desc->num_modes;
bool has_override_edid_mode = p->detected_panel &&
p->detected_panel != ERR_PTR(-EINVAL) &&
p->detected_panel->override_edid_mode;
@@ -599,7 +600,11 @@ static int panel_edp_get_modes(struct drm_panel *panel,
if (!p->edid)
p->edid = drm_get_edid(connector, p->ddc);
- if (p->edid) {
+ /*
+ * If both edid and hard-coded modes exists, skip edid modes to
+ * avoid multiple preferred modes.
+ */
+ if (p->edid && !has_hard_coded_modes) {
if (has_override_edid_mode) {
/*
* override_edid_mode is specified. Use
@@ -616,12 +621,7 @@ static int panel_edp_get_modes(struct drm_panel *panel,
pm_runtime_put_autosuspend(panel->dev);
}
- /*
- * Add hard-coded panel modes. Don't call this if there are no timings
- * and no modes (the generic edp-panel case) because it will clobber
- * the display_info that was already set by drm_add_edid_modes().
- */
- if (p->desc->num_timings || p->desc->num_modes)
+ if (has_hard_coded_modes)
num += panel_edp_get_non_edid_modes(p, connector);
else if (!num)
dev_warn(p->base.dev, "No display modes\n");
--
2.42.0.869.gea05f2083d-goog
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH v6 3/5] drm/panel-edp: drm/panel-edp: Add several generic edp panels
2023-11-07 20:41 ` [PATCH v6 3/5] drm/panel-edp: drm/panel-edp: Add several generic edp panels Hsin-Yi Wang
@ 2023-11-07 20:57 ` Greg KH
2023-11-07 21:52 ` Hsin-Yi Wang
2023-11-08 15:36 ` Maxime Ripard
2023-11-10 0:18 ` Doug Anderson
2 siblings, 1 reply; 18+ messages in thread
From: Greg KH @ 2023-11-07 20:57 UTC (permalink / raw)
To: Hsin-Yi Wang
Cc: Douglas Anderson, Neil Armstrong, Jessica Zhang, Sam Ravnborg,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Daniel Vetter, dri-devel, linux-kernel, stable
On Tue, Nov 07, 2023 at 12:41:53PM -0800, Hsin-Yi Wang wrote:
> Add a few generic edp panels used by mt8186 chromebooks.
>
> Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
> Reviewed-by: Douglas Anderson <dianders@chromium.org>
> ---
> no change.
> ---
> drivers/gpu/drm/panel/panel-edp.c | 51 +++++++++++++++++++++++++++++++
> 1 file changed, 51 insertions(+)
<formletter>
This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.
</formletter>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v6 4/5] drm/panel-edp: Add override_edid_mode quirk for generic edp
2023-11-07 20:41 ` [PATCH v6 4/5] drm/panel-edp: Add override_edid_mode quirk for generic edp Hsin-Yi Wang
@ 2023-11-07 20:58 ` Greg KH
2023-11-08 15:45 ` Maxime Ripard
1 sibling, 0 replies; 18+ messages in thread
From: Greg KH @ 2023-11-07 20:58 UTC (permalink / raw)
To: Hsin-Yi Wang
Cc: Douglas Anderson, Neil Armstrong, Jessica Zhang, Sam Ravnborg,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Daniel Vetter, dri-devel, linux-kernel, stable
On Tue, Nov 07, 2023 at 12:41:54PM -0800, Hsin-Yi Wang wrote:
> Generic edp gets mode from edid. However, some panels report incorrect
> mode in this way, resulting in glitches on panel. Introduce a new quirk
> additional_mode to the generic edid to pick a correct hardcoded mode.
>
> Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
> Reviewed-by: Douglas Anderson <dianders@chromium.org>
> ---
> no change.
> ---
> drivers/gpu/drm/panel/panel-edp.c | 67 ++++++++++++++++++++++++++++---
> 1 file changed, 62 insertions(+), 5 deletions(-)
>
<formletter>
This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.
</formletter>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v6 3/5] drm/panel-edp: drm/panel-edp: Add several generic edp panels
2023-11-07 20:57 ` Greg KH
@ 2023-11-07 21:52 ` Hsin-Yi Wang
0 siblings, 0 replies; 18+ messages in thread
From: Hsin-Yi Wang @ 2023-11-07 21:52 UTC (permalink / raw)
To: Greg KH
Cc: Douglas Anderson, Neil Armstrong, Jessica Zhang, Sam Ravnborg,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Daniel Vetter, dri-devel, linux-kernel, stable
On Tue, Nov 7, 2023 at 12:57 PM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Tue, Nov 07, 2023 at 12:41:53PM -0800, Hsin-Yi Wang wrote:
> > Add a few generic edp panels used by mt8186 chromebooks.
> >
> > Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
> > Reviewed-by: Douglas Anderson <dianders@chromium.org>
> > ---
> > no change.
> > ---
> > drivers/gpu/drm/panel/panel-edp.c | 51 +++++++++++++++++++++++++++++++
> > 1 file changed, 51 insertions(+)
>
> <formletter>
>
> This is not the correct way to submit patches for inclusion in the
> stable kernel tree. Please read:
> https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
> for how to do this properly.
>
Sorry for confusion, only patch 1 & 2 need to be picked to stable. 3~5 don't.
> </formletter>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v6 1/5] drm/panel-edp: drm/panel-edp: Fix AUO B116XAK01 name and timing
2023-11-07 20:41 ` [PATCH v6 1/5] drm/panel-edp: drm/panel-edp: Fix AUO B116XAK01 name and timing Hsin-Yi Wang
@ 2023-11-08 15:35 ` Maxime Ripard
2023-11-10 0:17 ` Doug Anderson
1 sibling, 0 replies; 18+ messages in thread
From: Maxime Ripard @ 2023-11-08 15:35 UTC (permalink / raw)
To: Hsin-Yi Wang
Cc: dri-devel, linux-kernel, stable, Daniel Vetter, David Airlie,
Douglas Anderson, Jessica Zhang, Maarten Lankhorst,
Maxime Ripard, Neil Armstrong, Sam Ravnborg, Thomas Zimmermann
On Tue, 7 Nov 2023 12:41:51 -0800, Hsin-Yi Wang wrote:
> Rename AUO 0x405c B116XAK01 to B116XAK01.0 and adjust the timing of
> auo_b116xak01: T3=200, T12=500, T7_max = 50 according to decoding edid
> and datasheet.
>
> Fixes: da458286a5e2 ("drm/panel: Add support for AUO B116XAK01 panel")
>
> [ ... ]
Acked-by: Maxime Ripard <mripard@kernel.org>
Thanks!
Maxime
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v6 2/5] drm/panel-edp: drm/panel-edp: Fix AUO B116XTN02 name
2023-11-07 20:41 ` [PATCH v6 2/5] drm/panel-edp: drm/panel-edp: Fix AUO B116XTN02 name Hsin-Yi Wang
@ 2023-11-08 15:35 ` Maxime Ripard
2023-11-10 0:18 ` Doug Anderson
1 sibling, 0 replies; 18+ messages in thread
From: Maxime Ripard @ 2023-11-08 15:35 UTC (permalink / raw)
To: Hsin-Yi Wang
Cc: dri-devel, linux-kernel, stable, Daniel Vetter, David Airlie,
Douglas Anderson, Jessica Zhang, Maarten Lankhorst,
Maxime Ripard, Neil Armstrong, Sam Ravnborg, Thomas Zimmermann
On Tue, 7 Nov 2023 12:41:52 -0800, Hsin-Yi Wang wrote:
> Rename AUO 0x235c B116XTN02 to B116XTN02.3 according to decoding edid.
>
> Fixes: 3db2420422a5 ("drm/panel-edp: Add AUO B116XTN02, BOE NT116WHM-N21,836X2, NV116WHM-N49 V8.0")
> Cc: stable@vger.kernel.org
> Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
>
> [ ... ]
Acked-by: Maxime Ripard <mripard@kernel.org>
Thanks!
Maxime
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v6 3/5] drm/panel-edp: drm/panel-edp: Add several generic edp panels
2023-11-07 20:41 ` [PATCH v6 3/5] drm/panel-edp: drm/panel-edp: Add several generic edp panels Hsin-Yi Wang
2023-11-07 20:57 ` Greg KH
@ 2023-11-08 15:36 ` Maxime Ripard
2023-11-10 0:18 ` Doug Anderson
2 siblings, 0 replies; 18+ messages in thread
From: Maxime Ripard @ 2023-11-08 15:36 UTC (permalink / raw)
To: Hsin-Yi Wang
Cc: dri-devel, linux-kernel, stable, Daniel Vetter, David Airlie,
Douglas Anderson, Jessica Zhang, Maarten Lankhorst,
Maxime Ripard, Neil Armstrong, Sam Ravnborg, Thomas Zimmermann
On Tue, 7 Nov 2023 12:41:53 -0800, Hsin-Yi Wang wrote:
> Add a few generic edp panels used by mt8186 chromebooks.
>
> Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
> Reviewed-by: Douglas Anderson <dianders@chromium.org>
Acked-by: Maxime Ripard <mripard@kernel.org>
Thanks!
Maxime
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v6 4/5] drm/panel-edp: Add override_edid_mode quirk for generic edp
2023-11-07 20:41 ` [PATCH v6 4/5] drm/panel-edp: Add override_edid_mode quirk for generic edp Hsin-Yi Wang
2023-11-07 20:58 ` Greg KH
@ 2023-11-08 15:45 ` Maxime Ripard
2023-11-08 17:04 ` Doug Anderson
1 sibling, 1 reply; 18+ messages in thread
From: Maxime Ripard @ 2023-11-08 15:45 UTC (permalink / raw)
To: Hsin-Yi Wang
Cc: Douglas Anderson, Neil Armstrong, Jessica Zhang, Sam Ravnborg,
Maarten Lankhorst, Thomas Zimmermann, David Airlie,
Daniel Vetter, dri-devel, linux-kernel, stable
[-- Attachment #1: Type: text/plain, Size: 3819 bytes --]
On Tue, Nov 07, 2023 at 12:41:54PM -0800, Hsin-Yi Wang wrote:
> Generic edp gets mode from edid. However, some panels report incorrect
> mode in this way, resulting in glitches on panel. Introduce a new quirk
> additional_mode to the generic edid to pick a correct hardcoded mode.
>
> Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
> Reviewed-by: Douglas Anderson <dianders@chromium.org>
> ---
> no change.
> ---
> drivers/gpu/drm/panel/panel-edp.c | 67 ++++++++++++++++++++++++++++---
> 1 file changed, 62 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-edp.c b/drivers/gpu/drm/panel/panel-edp.c
> index 599a949d74d1..c0c24d94c3a0 100644
> --- a/drivers/gpu/drm/panel/panel-edp.c
> +++ b/drivers/gpu/drm/panel/panel-edp.c
> @@ -203,6 +203,9 @@ struct edp_panel_entry {
>
> /** @name: Name of this panel (for printing to logs). */
> const char *name;
> +
> + /** @override_edid_mode: Override the mode obtained by edid. */
> + const struct drm_display_mode *override_edid_mode;
> };
>
> struct panel_edp {
> @@ -301,6 +304,24 @@ static unsigned int panel_edp_get_display_modes(struct panel_edp *panel,
> return num;
> }
>
> +static int panel_edp_override_edid_mode(struct panel_edp *panel,
> + struct drm_connector *connector,
> + const struct drm_display_mode *override_mode)
> +{
> + struct drm_display_mode *mode;
> +
> + mode = drm_mode_duplicate(connector->dev, override_mode);
> + if (!mode) {
> + dev_err(panel->base.dev, "failed to add additional mode\n");
> + return 0;
> + }
> +
> + mode->type |= DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
> + drm_mode_set_name(mode);
> + drm_mode_probed_add(connector, mode);
> + return 1;
> +}
> +
> static int panel_edp_get_non_edid_modes(struct panel_edp *panel,
> struct drm_connector *connector)
> {
> @@ -568,6 +589,9 @@ static int panel_edp_get_modes(struct drm_panel *panel,
> {
> struct panel_edp *p = to_panel_edp(panel);
> int num = 0;
> + bool has_override_edid_mode = p->detected_panel &&
> + p->detected_panel != ERR_PTR(-EINVAL) &&
> + p->detected_panel->override_edid_mode;
>
> /* probe EDID if a DDC bus is available */
> if (p->ddc) {
> @@ -575,9 +599,18 @@ static int panel_edp_get_modes(struct drm_panel *panel,
>
> if (!p->edid)
> p->edid = drm_get_edid(connector, p->ddc);
> -
> - if (p->edid)
> - num += drm_add_edid_modes(connector, p->edid);
> + if (p->edid) {
> + if (has_override_edid_mode) {
It's not clear to me why the override mechanism is only there when
there's a ddc bus?
You mentioned before that you were following panel-simple, but that's a
clear deviation from what I can see. If there's a reason for that
deviation, that's fine by me, but it should at least be documented in
the commit log.
> + /*
> + * override_edid_mode is specified. Use
> + * override_edid_mode instead of from edid.
> + */
> + num += panel_edp_override_edid_mode(p, connector,
> + p->detected_panel->override_edid_mode);
> + } else {
> + num += drm_add_edid_modes(connector, p->edid);
> + }
> + }
>
> pm_runtime_mark_last_busy(panel->dev);
> pm_runtime_put_autosuspend(panel->dev);
> @@ -950,6 +983,19 @@ static const struct panel_desc auo_b101ean01 = {
> },
> };
>
> +static const struct drm_display_mode auo_b116xa3_mode = {
> + .clock = 70589,
> + .hdisplay = 1366,
> + .hsync_start = 1366 + 40,
> + .hsync_end = 1366 + 40 + 40,
> + .htotal = 1366 + 40 + 40 + 32,
> + .vdisplay = 768,
> + .vsync_start = 768 + 10,
> + .vsync_end = 768 + 10 + 12,
> + .vtotal = 768 + 10 + 12 + 6,
> + .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
> +};
That should be a separate patch
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v6 4/5] drm/panel-edp: Add override_edid_mode quirk for generic edp
2023-11-08 15:45 ` Maxime Ripard
@ 2023-11-08 17:04 ` Doug Anderson
2023-11-10 0:19 ` Doug Anderson
0 siblings, 1 reply; 18+ messages in thread
From: Doug Anderson @ 2023-11-08 17:04 UTC (permalink / raw)
To: Maxime Ripard
Cc: Hsin-Yi Wang, Neil Armstrong, Jessica Zhang, Sam Ravnborg,
Maarten Lankhorst, Thomas Zimmermann, David Airlie,
Daniel Vetter, dri-devel, linux-kernel, stable
Hi,
On Wed, Nov 8, 2023 at 7:45 AM Maxime Ripard <mripard@kernel.org> wrote:
>
> > @@ -575,9 +599,18 @@ static int panel_edp_get_modes(struct drm_panel *panel,
> >
> > if (!p->edid)
> > p->edid = drm_get_edid(connector, p->ddc);
> > -
> > - if (p->edid)
> > - num += drm_add_edid_modes(connector, p->edid);
> > + if (p->edid) {
> > + if (has_override_edid_mode) {
>
> It's not clear to me why the override mechanism is only there when
> there's a ddc bus?
I think you're confusing the two different (but related) issues
addressed by this series. One is when you're using the generic
"edp-panel" compatible string. In that case the mode comes from the
EDID and only the EDID since there's no hardcoded mode. We need a mode
override there since some EDIDs shipped with a bad mode. That's the
subject of ${SUBJECT} patch.
The second issue is what to do with a hardcoded mode. That's the
subject of the next patch in the series (patch #5). Previously we
merged the hardcoded and EDID modes. Now (in the next patch) we use
only the hardcoded mode. There's no need for a fixup because the mode
is hardcoded in the kernel.
> You mentioned before that you were following panel-simple,
As of the newest version of the patch, it's no longer following
panel-simple in response to your feedback on previous versions.
> but that's a
> clear deviation from what I can see. If there's a reason for that
> deviation, that's fine by me, but it should at least be documented in
> the commit log.
I think the commit log is OK. I suspect the confusion is only because
you've reviewed previous versions of the series. Please shout if
things still look confusing.
> > @@ -950,6 +983,19 @@ static const struct panel_desc auo_b101ean01 = {
> > },
> > };
> >
> > +static const struct drm_display_mode auo_b116xa3_mode = {
> > + .clock = 70589,
> > + .hdisplay = 1366,
> > + .hsync_start = 1366 + 40,
> > + .hsync_end = 1366 + 40 + 40,
> > + .htotal = 1366 + 40 + 40 + 32,
> > + .vdisplay = 768,
> > + .vsync_start = 768 + 10,
> > + .vsync_end = 768 + 10 + 12,
> > + .vtotal = 768 + 10 + 12 + 6,
> > + .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
> > +};
>
> That should be a separate patch
That's fair. I didn't think it was a huge deal, but I agree that it's
slightly cleaner.
-Doug
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v6 1/5] drm/panel-edp: drm/panel-edp: Fix AUO B116XAK01 name and timing
2023-11-07 20:41 ` [PATCH v6 1/5] drm/panel-edp: drm/panel-edp: Fix AUO B116XAK01 name and timing Hsin-Yi Wang
2023-11-08 15:35 ` Maxime Ripard
@ 2023-11-10 0:17 ` Doug Anderson
1 sibling, 0 replies; 18+ messages in thread
From: Doug Anderson @ 2023-11-10 0:17 UTC (permalink / raw)
To: Hsin-Yi Wang
Cc: Neil Armstrong, Jessica Zhang, Sam Ravnborg, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Daniel Vetter,
dri-devel, linux-kernel, stable
Hi,
On Tue, Nov 7, 2023 at 12:46 PM Hsin-Yi Wang <hsinyi@chromium.org> wrote:
>
> Rename AUO 0x405c B116XAK01 to B116XAK01.0 and adjust the timing of
> auo_b116xak01: T3=200, T12=500, T7_max = 50 according to decoding edid
> and datasheet.
>
> Fixes: da458286a5e2 ("drm/panel: Add support for AUO B116XAK01 panel")
> Cc: stable@vger.kernel.org
> Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
> Reviewed-by: Douglas Anderson <dianders@chromium.org>
> ---
> v5->v6: split to 2 patches.
> ---
> drivers/gpu/drm/panel/panel-edp.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Even though this is a fix, it's not super urgent since it'll cause
conflicts with other changes, so pushed to drm-misc-next rather than
drm-misc-fixes.
fc6e76792965 drm/panel-edp: drm/panel-edp: Fix AUO B116XAK01 name and timing
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v6 2/5] drm/panel-edp: drm/panel-edp: Fix AUO B116XTN02 name
2023-11-07 20:41 ` [PATCH v6 2/5] drm/panel-edp: drm/panel-edp: Fix AUO B116XTN02 name Hsin-Yi Wang
2023-11-08 15:35 ` Maxime Ripard
@ 2023-11-10 0:18 ` Doug Anderson
1 sibling, 0 replies; 18+ messages in thread
From: Doug Anderson @ 2023-11-10 0:18 UTC (permalink / raw)
To: Hsin-Yi Wang
Cc: Neil Armstrong, Jessica Zhang, Sam Ravnborg, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Daniel Vetter,
dri-devel, linux-kernel, stable
Hi,
On Tue, Nov 7, 2023 at 12:46 PM Hsin-Yi Wang <hsinyi@chromium.org> wrote:
>
> Rename AUO 0x235c B116XTN02 to B116XTN02.3 according to decoding edid.
>
> Fixes: 3db2420422a5 ("drm/panel-edp: Add AUO B116XTN02, BOE NT116WHM-N21,836X2, NV116WHM-N49 V8.0")
> Cc: stable@vger.kernel.org
> Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
> Reviewed-by: Douglas Anderson <dianders@chromium.org>
> ---
> v5->v6: split to 2 patches.
> ---
> drivers/gpu/drm/panel/panel-edp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Even though this is a fix, it's not super urgent and since it'll cause
conflicts with other changes, so pushed to drm-misc-next rather than
drm-misc-fixes.
962845c090c4 drm/panel-edp: drm/panel-edp: Fix AUO B116XTN02 name
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v6 3/5] drm/panel-edp: drm/panel-edp: Add several generic edp panels
2023-11-07 20:41 ` [PATCH v6 3/5] drm/panel-edp: drm/panel-edp: Add several generic edp panels Hsin-Yi Wang
2023-11-07 20:57 ` Greg KH
2023-11-08 15:36 ` Maxime Ripard
@ 2023-11-10 0:18 ` Doug Anderson
2 siblings, 0 replies; 18+ messages in thread
From: Doug Anderson @ 2023-11-10 0:18 UTC (permalink / raw)
To: Hsin-Yi Wang
Cc: Neil Armstrong, Jessica Zhang, Sam Ravnborg, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Daniel Vetter,
dri-devel, linux-kernel
Hi,
On Tue, Nov 7, 2023 at 12:46 PM Hsin-Yi Wang <hsinyi@chromium.org> wrote:
>
> Add a few generic edp panels used by mt8186 chromebooks.
>
> Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
> Reviewed-by: Douglas Anderson <dianders@chromium.org>
> ---
> no change.
> ---
> drivers/gpu/drm/panel/panel-edp.c | 51 +++++++++++++++++++++++++++++++
> 1 file changed, 51 insertions(+)
Pushed to drm-misc-next:
4d53cf814795 drm/panel-edp: drm/panel-edp: Add several generic edp panels
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v6 4/5] drm/panel-edp: Add override_edid_mode quirk for generic edp
2023-11-08 17:04 ` Doug Anderson
@ 2023-11-10 0:19 ` Doug Anderson
0 siblings, 0 replies; 18+ messages in thread
From: Doug Anderson @ 2023-11-10 0:19 UTC (permalink / raw)
To: Maxime Ripard
Cc: Hsin-Yi Wang, Neil Armstrong, Jessica Zhang, Sam Ravnborg,
Maarten Lankhorst, Thomas Zimmermann, David Airlie,
Daniel Vetter, dri-devel, linux-kernel
Hi,
On Wed, Nov 8, 2023 at 9:04 AM Doug Anderson <dianders@chromium.org> wrote:
>
> Hi,
>
> On Wed, Nov 8, 2023 at 7:45 AM Maxime Ripard <mripard@kernel.org> wrote:
> >
> > > @@ -575,9 +599,18 @@ static int panel_edp_get_modes(struct drm_panel *panel,
> > >
> > > if (!p->edid)
> > > p->edid = drm_get_edid(connector, p->ddc);
> > > -
> > > - if (p->edid)
> > > - num += drm_add_edid_modes(connector, p->edid);
> > > + if (p->edid) {
> > > + if (has_override_edid_mode) {
> >
> > It's not clear to me why the override mechanism is only there when
> > there's a ddc bus?
>
> I think you're confusing the two different (but related) issues
> addressed by this series. One is when you're using the generic
> "edp-panel" compatible string. In that case the mode comes from the
> EDID and only the EDID since there's no hardcoded mode. We need a mode
> override there since some EDIDs shipped with a bad mode. That's the
> subject of ${SUBJECT} patch.
>
> The second issue is what to do with a hardcoded mode. That's the
> subject of the next patch in the series (patch #5). Previously we
> merged the hardcoded and EDID modes. Now (in the next patch) we use
> only the hardcoded mode. There's no need for a fixup because the mode
> is hardcoded in the kernel.
>
>
> > You mentioned before that you were following panel-simple,
>
> As of the newest version of the patch, it's no longer following
> panel-simple in response to your feedback on previous versions.
>
> > but that's a
> > clear deviation from what I can see. If there's a reason for that
> > deviation, that's fine by me, but it should at least be documented in
> > the commit log.
>
> I think the commit log is OK. I suspect the confusion is only because
> you've reviewed previous versions of the series. Please shout if
> things still look confusing.
>
>
> > > @@ -950,6 +983,19 @@ static const struct panel_desc auo_b101ean01 = {
> > > },
> > > };
> > >
> > > +static const struct drm_display_mode auo_b116xa3_mode = {
> > > + .clock = 70589,
> > > + .hdisplay = 1366,
> > > + .hsync_start = 1366 + 40,
> > > + .hsync_end = 1366 + 40 + 40,
> > > + .htotal = 1366 + 40 + 40 + 32,
> > > + .vdisplay = 768,
> > > + .vsync_start = 768 + 10,
> > > + .vsync_end = 768 + 10 + 12,
> > > + .vtotal = 768 + 10 + 12 + 6,
> > > + .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
> > > +};
> >
> > That should be a separate patch
>
> That's fair. I didn't think it was a huge deal, but I agree that it's
> slightly cleaner.
I've pushed the first 3 patches but not this patch nor the next one.
It wouldn't hurt to split patch #4 as Maxime requests and then send
the split patch #4 plus patch #5 as a v7. It's probably worth holding
off until either some time passes or Maxime responds and says that his
other concerns are addressed.
-Doug
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2023-11-10 0:19 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-07 20:41 [PATCH v6 0/5] Add a few panels and use correct modes Hsin-Yi Wang
2023-11-07 20:41 ` [PATCH v6 1/5] drm/panel-edp: drm/panel-edp: Fix AUO B116XAK01 name and timing Hsin-Yi Wang
2023-11-08 15:35 ` Maxime Ripard
2023-11-10 0:17 ` Doug Anderson
2023-11-07 20:41 ` [PATCH v6 2/5] drm/panel-edp: drm/panel-edp: Fix AUO B116XTN02 name Hsin-Yi Wang
2023-11-08 15:35 ` Maxime Ripard
2023-11-10 0:18 ` Doug Anderson
2023-11-07 20:41 ` [PATCH v6 3/5] drm/panel-edp: drm/panel-edp: Add several generic edp panels Hsin-Yi Wang
2023-11-07 20:57 ` Greg KH
2023-11-07 21:52 ` Hsin-Yi Wang
2023-11-08 15:36 ` Maxime Ripard
2023-11-10 0:18 ` Doug Anderson
2023-11-07 20:41 ` [PATCH v6 4/5] drm/panel-edp: Add override_edid_mode quirk for generic edp Hsin-Yi Wang
2023-11-07 20:58 ` Greg KH
2023-11-08 15:45 ` Maxime Ripard
2023-11-08 17:04 ` Doug Anderson
2023-11-10 0:19 ` Doug Anderson
2023-11-07 20:41 ` [PATCH v6 5/5] drm/panel-edp: Avoid adding multiple preferred modes Hsin-Yi Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).