Hi All,
This series fixes (works around) the gpd win 2's eDP panel being a portait mode panel being used in a landscape case (clamshell model).
I plan to merge the i915 bit through dinq and the actual quirk through drm-misc. These 2 are related in the sense that the quirk will not do anything without the i915 bits and the i915 bits only actually do anything once at least 1 quirk entry for an eDP panel is present. But they can be merged independently.
Regards,
Hans
So far we have only been calling drm_connector_init_panel_orientation_property(), which checks for panel orientation quirks in the drm_panel_orientation_quirks.c file, for DSI panels as so far only devices with DSI panels have had panels which are not mounted up right.
The new GPD win2 device uses a portrait screen in a landscape case, so now we've a device with an eDP panel which needs the panel-orientation property to let the fbcon code and userspace know that the image needs to be fixed-up.
This commit makes intel_edp_init_connector() call drm_connector_init_panel_orientation_property() so that the property gets added.
Reported-and-tested-by: russianneuromancer@ya.ru Signed-off-by: Hans de Goede hdegoede@redhat.com --- drivers/gpu/drm/i915/intel_dp.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 436c22de33b6..4f0b3c8f3f8c 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -6490,6 +6490,10 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp, intel_connector->panel.backlight.power = intel_edp_backlight_power; intel_panel_setup_backlight(connector, pipe);
+ if (fixed_mode) + drm_connector_init_panel_orientation_property( + connector, fixed_mode->hdisplay, fixed_mode->vdisplay); + return true;
out_vdd_off:
On Sun, 09 Sep 2018, Hans de Goede j.w.r.degoede@gmail.com wrote:
So far we have only been calling drm_connector_init_panel_orientation_property(), which checks for panel orientation quirks in the drm_panel_orientation_quirks.c file, for DSI panels as so far only devices with DSI panels have had panels which are not mounted up right.
The new GPD win2 device uses a portrait screen in a landscape case, so now we've a device with an eDP panel which needs the panel-orientation property to let the fbcon code and userspace know that the image needs to be fixed-up.
This commit makes intel_edp_init_connector() call drm_connector_init_panel_orientation_property() so that the property gets added.
Reported-and-tested-by: russianneuromancer@ya.ru Signed-off-by: Hans de Goede hdegoede@redhat.com
Always saddened by every quirk...
Reviewed-by: Jani Nikula jani.nikula@intel.com
drivers/gpu/drm/i915/intel_dp.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 436c22de33b6..4f0b3c8f3f8c 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -6490,6 +6490,10 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp, intel_connector->panel.backlight.power = intel_edp_backlight_power; intel_panel_setup_backlight(connector, pipe);
- if (fixed_mode)
drm_connector_init_panel_orientation_property(
connector, fixed_mode->hdisplay, fixed_mode->vdisplay);
- return true;
out_vdd_off:
GPD has done it again, make a nice device (good), use way too generic DMI strings (bad) and use a portrait screen rotated 90 degrees (ugly).
Because of the too generic DMI strings this entry is also doing bios-date matching, so the gpd_win2 data struct may very well need to be updated with some extra bios-dates in the future.
Reported-and-tested-by: russianneuromancer@ya.ru Signed-off-by: Hans de Goede hdegoede@redhat.com --- drivers/gpu/drm/drm_panel_orientation_quirks.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/drivers/gpu/drm/drm_panel_orientation_quirks.c b/drivers/gpu/drm/drm_panel_orientation_quirks.c index fe9c6c731e87..280a41d33081 100644 --- a/drivers/gpu/drm/drm_panel_orientation_quirks.c +++ b/drivers/gpu/drm/drm_panel_orientation_quirks.c @@ -53,6 +53,14 @@ static const struct drm_dmi_panel_orientation_data gpd_win = { .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP, };
+static const struct drm_dmi_panel_orientation_data gpd_win2 = { + .width = 720, + .height = 1280, + .bios_dates = (const char * const []){ + "12/07/2017", "05/24/2018", NULL }, + .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP, +}; + static const struct drm_dmi_panel_orientation_data itworks_tw891 = { .width = 800, .height = 1280, @@ -94,6 +102,14 @@ static const struct dmi_system_id orientation_data[] = { DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"), }, .driver_data = (void *)&gpd_win, + }, { /* GPD Win 2 (too generic strings, also match on bios date) */ + .matches = { + DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Default string"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"), + DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "Default string"), + DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"), + }, + .driver_data = (void *)&gpd_win2, }, { /* I.T.Works TW891 */ .matches = { DMI_EXACT_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),
On Sun, 09 Sep 2018, Hans de Goede j.w.r.degoede@gmail.com wrote:
GPD has done it again, make a nice device (good), use way too generic DMI strings (bad) and use a portrait screen rotated 90 degrees (ugly).
Because of the too generic DMI strings this entry is also doing bios-date matching, so the gpd_win2 data struct may very well need to be updated with some extra bios-dates in the future.
Reported-and-tested-by: russianneuromancer@ya.ru Signed-off-by: Hans de Goede hdegoede@redhat.com
FWIW,
Acked-by: Jani Nikula jani.nikula@intel.com
drivers/gpu/drm/drm_panel_orientation_quirks.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/drivers/gpu/drm/drm_panel_orientation_quirks.c b/drivers/gpu/drm/drm_panel_orientation_quirks.c index fe9c6c731e87..280a41d33081 100644 --- a/drivers/gpu/drm/drm_panel_orientation_quirks.c +++ b/drivers/gpu/drm/drm_panel_orientation_quirks.c @@ -53,6 +53,14 @@ static const struct drm_dmi_panel_orientation_data gpd_win = { .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP, };
+static const struct drm_dmi_panel_orientation_data gpd_win2 = {
- .width = 720,
- .height = 1280,
- .bios_dates = (const char * const []){
"12/07/2017", "05/24/2018", NULL },
- .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
+};
static const struct drm_dmi_panel_orientation_data itworks_tw891 = { .width = 800, .height = 1280, @@ -94,6 +102,14 @@ static const struct dmi_system_id orientation_data[] = { DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"), }, .driver_data = (void *)&gpd_win,
- }, { /* GPD Win 2 (too generic strings, also match on bios date) */
.matches = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Default string"),
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"),
DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "Default string"),
DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"),
},
}, { /* I.T.Works TW891 */ .matches = { DMI_EXACT_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),.driver_data = (void *)&gpd_win2,
Hi,
On 09-09-18 15:34, Hans de Goede wrote:
Hi All,
This series fixes (works around) the gpd win 2's eDP panel being a portait mode panel being used in a landscape case (clamshell model).
I plan to merge the i915 bit through dinq and the actual quirk through drm-misc. These 2 are related in the sense that the quirk will not do anything without the i915 bits and the i915 bits only actually do anything once at least 1 quirk entry for an eDP panel is present. But they can be merged independently.
Off-topic/meta:
I got a number of bounces for all the @linux.intel.com addresses, but according to MAINTAINERS those are still the one to use ?
Regards,
Hans
Hi,
On 09-09-18 15:34, Hans de Goede wrote:
Hi All,
This series fixes (works around) the gpd win 2's eDP panel being a portait mode panel being used in a landscape case (clamshell model).
I plan to merge the i915 bit through dinq and the actual quirk through drm-misc. These 2 are related in the sense that the quirk will not do anything without the i915 bits and the i915 bits only actually do anything once at least 1 quirk entry for an eDP panel is present. But they can be merged independently.
Can I get a review / acked-by for these 2 trivial patches, please ?
So that I can push 1 to dinq and the other to drm-misc/next .
Regards,
Hans
dri-devel@lists.freedesktop.org