* [PATCH 0/2] drm: Make i915 check for panel orient quirks on eDP and add one such quirk
@ 2018-09-09 13:34 Hans de Goede
2018-09-09 13:34 ` [PATCH 1/2] drm/i915: Check for panel orientation quirks on eDP panels Hans de Goede
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Hans de Goede @ 2018-09-09 13:34 UTC (permalink / raw)
To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi,
Ville Syrjälä, Daniel Vetter
Cc: Hans de Goede, intel-gfx, dri-devel
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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH 1/2] drm/i915: Check for panel orientation quirks on eDP panels 2018-09-09 13:34 [PATCH 0/2] drm: Make i915 check for panel orient quirks on eDP and add one such quirk Hans de Goede @ 2018-09-09 13:34 ` Hans de Goede 2018-09-25 8:30 ` Jani Nikula 2018-09-09 13:34 ` [PATCH 2/2] drm: panel-orientation-quirks: Add quirk for GPD win2 Hans de Goede ` (2 subsequent siblings) 3 siblings, 1 reply; 7+ messages in thread From: Hans de Goede @ 2018-09-09 13:34 UTC (permalink / raw) To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, Ville Syrjälä, Daniel Vetter Cc: Hans de Goede, intel-gfx, dri-devel 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: -- 2.19.0.rc0 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] drm/i915: Check for panel orientation quirks on eDP panels 2018-09-09 13:34 ` [PATCH 1/2] drm/i915: Check for panel orientation quirks on eDP panels Hans de Goede @ 2018-09-25 8:30 ` Jani Nikula 0 siblings, 0 replies; 7+ messages in thread From: Jani Nikula @ 2018-09-25 8:30 UTC (permalink / raw) To: Hans de Goede, Joonas Lahtinen, Rodrigo Vivi, Ville Syrjälä, Daniel Vetter Cc: Hans de Goede, intel-gfx, dri-devel 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: -- Jani Nikula, Intel Open Source Graphics Center _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] drm: panel-orientation-quirks: Add quirk for GPD win2 2018-09-09 13:34 [PATCH 0/2] drm: Make i915 check for panel orient quirks on eDP and add one such quirk Hans de Goede 2018-09-09 13:34 ` [PATCH 1/2] drm/i915: Check for panel orientation quirks on eDP panels Hans de Goede @ 2018-09-09 13:34 ` Hans de Goede 2018-09-25 8:30 ` Jani Nikula 2018-09-09 13:39 ` [PATCH 0/2] drm: Make i915 check for panel orient quirks on eDP and add one such quirk Hans de Goede 2018-09-25 8:05 ` Hans de Goede 3 siblings, 1 reply; 7+ messages in thread From: Hans de Goede @ 2018-09-09 13:34 UTC (permalink / raw) To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, Ville Syrjälä, Daniel Vetter Cc: Hans de Goede, intel-gfx, dri-devel 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."), -- 2.19.0.rc0 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] drm: panel-orientation-quirks: Add quirk for GPD win2 2018-09-09 13:34 ` [PATCH 2/2] drm: panel-orientation-quirks: Add quirk for GPD win2 Hans de Goede @ 2018-09-25 8:30 ` Jani Nikula 0 siblings, 0 replies; 7+ messages in thread From: Jani Nikula @ 2018-09-25 8:30 UTC (permalink / raw) To: Hans de Goede, Joonas Lahtinen, Rodrigo Vivi, Ville Syrjälä, Daniel Vetter Cc: Hans de Goede, intel-gfx, dri-devel 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"), > + }, > + .driver_data = (void *)&gpd_win2, > }, { /* I.T.Works TW891 */ > .matches = { > DMI_EXACT_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."), -- Jani Nikula, Intel Open Source Graphics Center _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] drm: Make i915 check for panel orient quirks on eDP and add one such quirk 2018-09-09 13:34 [PATCH 0/2] drm: Make i915 check for panel orient quirks on eDP and add one such quirk Hans de Goede 2018-09-09 13:34 ` [PATCH 1/2] drm/i915: Check for panel orientation quirks on eDP panels Hans de Goede 2018-09-09 13:34 ` [PATCH 2/2] drm: panel-orientation-quirks: Add quirk for GPD win2 Hans de Goede @ 2018-09-09 13:39 ` Hans de Goede 2018-09-25 8:05 ` Hans de Goede 3 siblings, 0 replies; 7+ messages in thread From: Hans de Goede @ 2018-09-09 13:39 UTC (permalink / raw) To: Hans de Goede, Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, Ville Syrjälä, Daniel Vetter Cc: intel-gfx, dri-devel 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 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] drm: Make i915 check for panel orient quirks on eDP and add one such quirk 2018-09-09 13:34 [PATCH 0/2] drm: Make i915 check for panel orient quirks on eDP and add one such quirk Hans de Goede ` (2 preceding siblings ...) 2018-09-09 13:39 ` [PATCH 0/2] drm: Make i915 check for panel orient quirks on eDP and add one such quirk Hans de Goede @ 2018-09-25 8:05 ` Hans de Goede 3 siblings, 0 replies; 7+ messages in thread From: Hans de Goede @ 2018-09-25 8:05 UTC (permalink / raw) To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, Ville Syrjälä, Daniel Vetter Cc: intel-gfx, dri-devel 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 mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-09-25 8:30 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-09-09 13:34 [PATCH 0/2] drm: Make i915 check for panel orient quirks on eDP and add one such quirk Hans de Goede 2018-09-09 13:34 ` [PATCH 1/2] drm/i915: Check for panel orientation quirks on eDP panels Hans de Goede 2018-09-25 8:30 ` Jani Nikula 2018-09-09 13:34 ` [PATCH 2/2] drm: panel-orientation-quirks: Add quirk for GPD win2 Hans de Goede 2018-09-25 8:30 ` Jani Nikula 2018-09-09 13:39 ` [PATCH 0/2] drm: Make i915 check for panel orient quirks on eDP and add one such quirk Hans de Goede 2018-09-25 8:05 ` Hans de Goede
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox