All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: linux-kernel@vger.kernel.org
Cc: Mark Rutland <mark.rutland@arm.com>,
	Hans de Goede <j.w.r.degoede@gmail.com>,
	David Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org, Sam Ravnborg <sam@ravnborg.org>,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	CK Hu <ck.hu@mediatek.com>,
	devicetree@vger.kernel.org, intel-gfx@lists.freedesktop.org,
	Derek Basehore <dbasehore@chromium.org>,
	Rob Herring <robh+dt@kernel.org>,
	linux-mediatek@lists.infradead.org,
	Matthias Brugger <matthias.bgg@gmail.com>,
	linux-arm-kernel@lists.infradead.org,
	Philipp Zabel <p.zabel@pengutronix.de>
Subject: Re: [PATCH 4/5] drm/connector: Split out orientation quirk detection
Date: Tue, 11 Jun 2019 11:08:03 +0300	[thread overview]
Message-ID: <87zhmoy270.fsf@intel.com> (raw)
In-Reply-To: <20190611040350.90064-5-dbasehore@chromium.org>

On Mon, 10 Jun 2019, Derek Basehore <dbasehore@chromium.org> wrote:
> This removes the orientation quirk detection from the code to add
> an orientation property to a panel. This is used only for legacy x86
> systems, yet we'd like to start using this on devicetree systems where
> quirk detection like this is not needed.

Not needed, but no harm done either, right?

I guess I'll defer judgement on this to Hans and Ville (Cc'd).

Side note, I'm about to apply some (minor) conflicting changes in our
-next as soon as I get CI results on it.


BR,
Jani.


>
> Signed-off-by: Derek Basehore <dbasehore@chromium.org>
> ---
>  drivers/gpu/drm/drm_connector.c | 16 ++++------------
>  drivers/gpu/drm/i915/intel_dp.c | 14 +++++++++++---
>  drivers/gpu/drm/i915/vlv_dsi.c  | 14 ++++++++++----
>  include/drm/drm_connector.h     |  2 +-
>  4 files changed, 26 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> index e17586aaa80f..58a09b65028b 100644
> --- a/drivers/gpu/drm/drm_connector.c
> +++ b/drivers/gpu/drm/drm_connector.c
> @@ -1894,31 +1894,23 @@ EXPORT_SYMBOL(drm_connector_set_vrr_capable_property);
>   * drm_connector_init_panel_orientation_property -
>   *	initialize the connecters panel_orientation property
>   * @connector: connector for which to init the panel-orientation property.
> - * @width: width in pixels of the panel, used for panel quirk detection
> - * @height: height in pixels of the panel, used for panel quirk detection
>   *
>   * This function should only be called for built-in panels, after setting
>   * connector->display_info.panel_orientation first (if known).
>   *
> - * This function will check for platform specific (e.g. DMI based) quirks
> - * overriding display_info.panel_orientation first, then if panel_orientation
> - * is not DRM_MODE_PANEL_ORIENTATION_UNKNOWN it will attach the
> - * "panel orientation" property to the connector.
> + * This function will check if the panel_orientation is not
> + * DRM_MODE_PANEL_ORIENTATION_UNKNOWN. If not, it will attach the "panel
> + * orientation" property to the connector.
>   *
>   * Returns:
>   * Zero on success, negative errno on failure.
>   */
>  int drm_connector_init_panel_orientation_property(
> -	struct drm_connector *connector, int width, int height)
> +	struct drm_connector *connector)
>  {
>  	struct drm_device *dev = connector->dev;
>  	struct drm_display_info *info = &connector->display_info;
>  	struct drm_property *prop;
> -	int orientation_quirk;
> -
> -	orientation_quirk = drm_get_panel_orientation_quirk(width, height);
> -	if (orientation_quirk != DRM_MODE_PANEL_ORIENTATION_UNKNOWN)
> -		info->panel_orientation = orientation_quirk;
>  
>  	if (info->panel_orientation == DRM_MODE_PANEL_ORIENTATION_UNKNOWN)
>  		return 0;
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index b099a9dc28fd..72ab090ea97a 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -40,6 +40,7 @@
>  #include <drm/drm_edid.h>
>  #include <drm/drm_hdcp.h>
>  #include <drm/drm_probe_helper.h>
> +#include <drm/drm_utils.h>
>  #include <drm/i915_drm.h>
>  
>  #include "i915_debugfs.h"
> @@ -7281,9 +7282,16 @@ 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);
> +	if (fixed_mode) {
> +		int orientation = drm_get_panel_orientation_quirk(
> +				fixed_mode->hdisplay, fixed_mode->vdisplay);
> +
> +		if (orientation != DRM_MODE_PANEL_ORIENTATION_UNKNOWN)
> +			connector->display_info.panel_orientation =
> +				orientation;
> +
> +		drm_connector_init_panel_orientation_property(connector);
> +	}
>  
>  	return true;
>  
> diff --git a/drivers/gpu/drm/i915/vlv_dsi.c b/drivers/gpu/drm/i915/vlv_dsi.c
> index bfe2891eac37..27f86a787f60 100644
> --- a/drivers/gpu/drm/i915/vlv_dsi.c
> +++ b/drivers/gpu/drm/i915/vlv_dsi.c
> @@ -30,6 +30,7 @@
>  #include <drm/drm_crtc.h>
>  #include <drm/drm_edid.h>
>  #include <drm/drm_mipi_dsi.h>
> +#include <drm/drm_utils.h>
>  
>  #include "i915_drv.h"
>  #include "intel_atomic.h"
> @@ -1650,6 +1651,7 @@ static void intel_dsi_add_properties(struct intel_connector *connector)
>  
>  	if (connector->panel.fixed_mode) {
>  		u32 allowed_scalers;
> +		int orientation;
>  
>  		allowed_scalers = BIT(DRM_MODE_SCALE_ASPECT) | BIT(DRM_MODE_SCALE_FULLSCREEN);
>  		if (!HAS_GMCH(dev_priv))
> @@ -1660,12 +1662,16 @@ static void intel_dsi_add_properties(struct intel_connector *connector)
>  
>  		connector->base.state->scaling_mode = DRM_MODE_SCALE_ASPECT;
>  
> -		connector->base.display_info.panel_orientation =
> -			vlv_dsi_get_panel_orientation(connector);
> -		drm_connector_init_panel_orientation_property(
> -				&connector->base,
> +		orientation = drm_get_panel_orientation_quirk(
>  				connector->panel.fixed_mode->hdisplay,
>  				connector->panel.fixed_mode->vdisplay);
> +		if (orientation != DRM_MODE_PANEL_ORIENTATION_UNKNOWN)
> +			connector->base.display_info.panel_orientation = orientation;
> +		else
> +			connector->base.display_info.panel_orientation =
> +				vlv_dsi_get_panel_orientation(connector);
> +
> +		drm_connector_init_panel_orientation_property(&connector->base);
>  	}
>  }
>  
> diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
> index 47e749b74e5f..c2992f7a0dd5 100644
> --- a/include/drm/drm_connector.h
> +++ b/include/drm/drm_connector.h
> @@ -1370,7 +1370,7 @@ void drm_connector_set_link_status_property(struct drm_connector *connector,
>  void drm_connector_set_vrr_capable_property(
>  		struct drm_connector *connector, bool capable);
>  int drm_connector_init_panel_orientation_property(
> -	struct drm_connector *connector, int width, int height);
> +	struct drm_connector *connector);
>  int drm_connector_attach_max_bpc_property(struct drm_connector *connector,
>  					  int min, int max);

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Derek Basehore <dbasehore@chromium.org>, linux-kernel@vger.kernel.org
Cc: "Mark Rutland" <mark.rutland@arm.com>,
	"Hans de Goede" <j.w.r.degoede@gmail.com>,
	"David Airlie" <airlied@linux.ie>,
	"Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>,
	dri-devel@lists.freedesktop.org,
	"Thierry Reding" <thierry.reding@gmail.com>,
	"Sam Ravnborg" <sam@ravnborg.org>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"Maxime Ripard" <maxime.ripard@bootlin.com>,
	"CK Hu" <ck.hu@mediatek.com>,
	devicetree@vger.kernel.org, "Daniel Vetter" <daniel@ffwll.ch>,
	intel-gfx@lists.freedesktop.org,
	"Derek Basehore" <dbasehore@chromium.org>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	linux-mediatek@lists.infradead.org,
	"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"Sean Paul" <sean@poorly.run>,
	linux-arm-kernel@lists.infradead.org,
	"Philipp Zabel" <p.zabel@pengutronix.de>
Subject: Re: [PATCH 4/5] drm/connector: Split out orientation quirk detection
Date: Tue, 11 Jun 2019 11:08:03 +0300	[thread overview]
Message-ID: <87zhmoy270.fsf@intel.com> (raw)
In-Reply-To: <20190611040350.90064-5-dbasehore@chromium.org>

On Mon, 10 Jun 2019, Derek Basehore <dbasehore@chromium.org> wrote:
> This removes the orientation quirk detection from the code to add
> an orientation property to a panel. This is used only for legacy x86
> systems, yet we'd like to start using this on devicetree systems where
> quirk detection like this is not needed.

Not needed, but no harm done either, right?

I guess I'll defer judgement on this to Hans and Ville (Cc'd).

Side note, I'm about to apply some (minor) conflicting changes in our
-next as soon as I get CI results on it.


BR,
Jani.


>
> Signed-off-by: Derek Basehore <dbasehore@chromium.org>
> ---
>  drivers/gpu/drm/drm_connector.c | 16 ++++------------
>  drivers/gpu/drm/i915/intel_dp.c | 14 +++++++++++---
>  drivers/gpu/drm/i915/vlv_dsi.c  | 14 ++++++++++----
>  include/drm/drm_connector.h     |  2 +-
>  4 files changed, 26 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> index e17586aaa80f..58a09b65028b 100644
> --- a/drivers/gpu/drm/drm_connector.c
> +++ b/drivers/gpu/drm/drm_connector.c
> @@ -1894,31 +1894,23 @@ EXPORT_SYMBOL(drm_connector_set_vrr_capable_property);
>   * drm_connector_init_panel_orientation_property -
>   *	initialize the connecters panel_orientation property
>   * @connector: connector for which to init the panel-orientation property.
> - * @width: width in pixels of the panel, used for panel quirk detection
> - * @height: height in pixels of the panel, used for panel quirk detection
>   *
>   * This function should only be called for built-in panels, after setting
>   * connector->display_info.panel_orientation first (if known).
>   *
> - * This function will check for platform specific (e.g. DMI based) quirks
> - * overriding display_info.panel_orientation first, then if panel_orientation
> - * is not DRM_MODE_PANEL_ORIENTATION_UNKNOWN it will attach the
> - * "panel orientation" property to the connector.
> + * This function will check if the panel_orientation is not
> + * DRM_MODE_PANEL_ORIENTATION_UNKNOWN. If not, it will attach the "panel
> + * orientation" property to the connector.
>   *
>   * Returns:
>   * Zero on success, negative errno on failure.
>   */
>  int drm_connector_init_panel_orientation_property(
> -	struct drm_connector *connector, int width, int height)
> +	struct drm_connector *connector)
>  {
>  	struct drm_device *dev = connector->dev;
>  	struct drm_display_info *info = &connector->display_info;
>  	struct drm_property *prop;
> -	int orientation_quirk;
> -
> -	orientation_quirk = drm_get_panel_orientation_quirk(width, height);
> -	if (orientation_quirk != DRM_MODE_PANEL_ORIENTATION_UNKNOWN)
> -		info->panel_orientation = orientation_quirk;
>  
>  	if (info->panel_orientation == DRM_MODE_PANEL_ORIENTATION_UNKNOWN)
>  		return 0;
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index b099a9dc28fd..72ab090ea97a 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -40,6 +40,7 @@
>  #include <drm/drm_edid.h>
>  #include <drm/drm_hdcp.h>
>  #include <drm/drm_probe_helper.h>
> +#include <drm/drm_utils.h>
>  #include <drm/i915_drm.h>
>  
>  #include "i915_debugfs.h"
> @@ -7281,9 +7282,16 @@ 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);
> +	if (fixed_mode) {
> +		int orientation = drm_get_panel_orientation_quirk(
> +				fixed_mode->hdisplay, fixed_mode->vdisplay);
> +
> +		if (orientation != DRM_MODE_PANEL_ORIENTATION_UNKNOWN)
> +			connector->display_info.panel_orientation =
> +				orientation;
> +
> +		drm_connector_init_panel_orientation_property(connector);
> +	}
>  
>  	return true;
>  
> diff --git a/drivers/gpu/drm/i915/vlv_dsi.c b/drivers/gpu/drm/i915/vlv_dsi.c
> index bfe2891eac37..27f86a787f60 100644
> --- a/drivers/gpu/drm/i915/vlv_dsi.c
> +++ b/drivers/gpu/drm/i915/vlv_dsi.c
> @@ -30,6 +30,7 @@
>  #include <drm/drm_crtc.h>
>  #include <drm/drm_edid.h>
>  #include <drm/drm_mipi_dsi.h>
> +#include <drm/drm_utils.h>
>  
>  #include "i915_drv.h"
>  #include "intel_atomic.h"
> @@ -1650,6 +1651,7 @@ static void intel_dsi_add_properties(struct intel_connector *connector)
>  
>  	if (connector->panel.fixed_mode) {
>  		u32 allowed_scalers;
> +		int orientation;
>  
>  		allowed_scalers = BIT(DRM_MODE_SCALE_ASPECT) | BIT(DRM_MODE_SCALE_FULLSCREEN);
>  		if (!HAS_GMCH(dev_priv))
> @@ -1660,12 +1662,16 @@ static void intel_dsi_add_properties(struct intel_connector *connector)
>  
>  		connector->base.state->scaling_mode = DRM_MODE_SCALE_ASPECT;
>  
> -		connector->base.display_info.panel_orientation =
> -			vlv_dsi_get_panel_orientation(connector);
> -		drm_connector_init_panel_orientation_property(
> -				&connector->base,
> +		orientation = drm_get_panel_orientation_quirk(
>  				connector->panel.fixed_mode->hdisplay,
>  				connector->panel.fixed_mode->vdisplay);
> +		if (orientation != DRM_MODE_PANEL_ORIENTATION_UNKNOWN)
> +			connector->base.display_info.panel_orientation = orientation;
> +		else
> +			connector->base.display_info.panel_orientation =
> +				vlv_dsi_get_panel_orientation(connector);
> +
> +		drm_connector_init_panel_orientation_property(&connector->base);
>  	}
>  }
>  
> diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
> index 47e749b74e5f..c2992f7a0dd5 100644
> --- a/include/drm/drm_connector.h
> +++ b/include/drm/drm_connector.h
> @@ -1370,7 +1370,7 @@ void drm_connector_set_link_status_property(struct drm_connector *connector,
>  void drm_connector_set_vrr_capable_property(
>  		struct drm_connector *connector, bool capable);
>  int drm_connector_init_panel_orientation_property(
> -	struct drm_connector *connector, int width, int height);
> +	struct drm_connector *connector);
>  int drm_connector_attach_max_bpc_property(struct drm_connector *connector,
>  					  int min, int max);

-- 
Jani Nikula, Intel Open Source Graphics Center

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Derek Basehore <dbasehore@chromium.org>, linux-kernel@vger.kernel.org
Cc: "Thierry Reding" <thierry.reding@gmail.com>,
	"Sam Ravnborg" <sam@ravnborg.org>,
	"David Airlie" <airlied@linux.ie>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <maxime.ripard@bootlin.com>,
	"Sean Paul" <sean@poorly.run>,
	"Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>,
	"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
	"CK Hu" <ck.hu@mediatek.com>,
	"Philipp Zabel" <p.zabel@pengutronix.de>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	intel-gfx@lists.freedesktop.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org,
	"Derek Basehore" <dbasehore@chromium.org>,
	"Hans de Goede" <j.w.r.degoede@gmail.com>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>
Subject: Re: [PATCH 4/5] drm/connector: Split out orientation quirk detection
Date: Tue, 11 Jun 2019 11:08:03 +0300	[thread overview]
Message-ID: <87zhmoy270.fsf@intel.com> (raw)
In-Reply-To: <20190611040350.90064-5-dbasehore@chromium.org>

On Mon, 10 Jun 2019, Derek Basehore <dbasehore@chromium.org> wrote:
> This removes the orientation quirk detection from the code to add
> an orientation property to a panel. This is used only for legacy x86
> systems, yet we'd like to start using this on devicetree systems where
> quirk detection like this is not needed.

Not needed, but no harm done either, right?

I guess I'll defer judgement on this to Hans and Ville (Cc'd).

Side note, I'm about to apply some (minor) conflicting changes in our
-next as soon as I get CI results on it.


BR,
Jani.


>
> Signed-off-by: Derek Basehore <dbasehore@chromium.org>
> ---
>  drivers/gpu/drm/drm_connector.c | 16 ++++------------
>  drivers/gpu/drm/i915/intel_dp.c | 14 +++++++++++---
>  drivers/gpu/drm/i915/vlv_dsi.c  | 14 ++++++++++----
>  include/drm/drm_connector.h     |  2 +-
>  4 files changed, 26 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> index e17586aaa80f..58a09b65028b 100644
> --- a/drivers/gpu/drm/drm_connector.c
> +++ b/drivers/gpu/drm/drm_connector.c
> @@ -1894,31 +1894,23 @@ EXPORT_SYMBOL(drm_connector_set_vrr_capable_property);
>   * drm_connector_init_panel_orientation_property -
>   *	initialize the connecters panel_orientation property
>   * @connector: connector for which to init the panel-orientation property.
> - * @width: width in pixels of the panel, used for panel quirk detection
> - * @height: height in pixels of the panel, used for panel quirk detection
>   *
>   * This function should only be called for built-in panels, after setting
>   * connector->display_info.panel_orientation first (if known).
>   *
> - * This function will check for platform specific (e.g. DMI based) quirks
> - * overriding display_info.panel_orientation first, then if panel_orientation
> - * is not DRM_MODE_PANEL_ORIENTATION_UNKNOWN it will attach the
> - * "panel orientation" property to the connector.
> + * This function will check if the panel_orientation is not
> + * DRM_MODE_PANEL_ORIENTATION_UNKNOWN. If not, it will attach the "panel
> + * orientation" property to the connector.
>   *
>   * Returns:
>   * Zero on success, negative errno on failure.
>   */
>  int drm_connector_init_panel_orientation_property(
> -	struct drm_connector *connector, int width, int height)
> +	struct drm_connector *connector)
>  {
>  	struct drm_device *dev = connector->dev;
>  	struct drm_display_info *info = &connector->display_info;
>  	struct drm_property *prop;
> -	int orientation_quirk;
> -
> -	orientation_quirk = drm_get_panel_orientation_quirk(width, height);
> -	if (orientation_quirk != DRM_MODE_PANEL_ORIENTATION_UNKNOWN)
> -		info->panel_orientation = orientation_quirk;
>  
>  	if (info->panel_orientation == DRM_MODE_PANEL_ORIENTATION_UNKNOWN)
>  		return 0;
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index b099a9dc28fd..72ab090ea97a 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -40,6 +40,7 @@
>  #include <drm/drm_edid.h>
>  #include <drm/drm_hdcp.h>
>  #include <drm/drm_probe_helper.h>
> +#include <drm/drm_utils.h>
>  #include <drm/i915_drm.h>
>  
>  #include "i915_debugfs.h"
> @@ -7281,9 +7282,16 @@ 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);
> +	if (fixed_mode) {
> +		int orientation = drm_get_panel_orientation_quirk(
> +				fixed_mode->hdisplay, fixed_mode->vdisplay);
> +
> +		if (orientation != DRM_MODE_PANEL_ORIENTATION_UNKNOWN)
> +			connector->display_info.panel_orientation =
> +				orientation;
> +
> +		drm_connector_init_panel_orientation_property(connector);
> +	}
>  
>  	return true;
>  
> diff --git a/drivers/gpu/drm/i915/vlv_dsi.c b/drivers/gpu/drm/i915/vlv_dsi.c
> index bfe2891eac37..27f86a787f60 100644
> --- a/drivers/gpu/drm/i915/vlv_dsi.c
> +++ b/drivers/gpu/drm/i915/vlv_dsi.c
> @@ -30,6 +30,7 @@
>  #include <drm/drm_crtc.h>
>  #include <drm/drm_edid.h>
>  #include <drm/drm_mipi_dsi.h>
> +#include <drm/drm_utils.h>
>  
>  #include "i915_drv.h"
>  #include "intel_atomic.h"
> @@ -1650,6 +1651,7 @@ static void intel_dsi_add_properties(struct intel_connector *connector)
>  
>  	if (connector->panel.fixed_mode) {
>  		u32 allowed_scalers;
> +		int orientation;
>  
>  		allowed_scalers = BIT(DRM_MODE_SCALE_ASPECT) | BIT(DRM_MODE_SCALE_FULLSCREEN);
>  		if (!HAS_GMCH(dev_priv))
> @@ -1660,12 +1662,16 @@ static void intel_dsi_add_properties(struct intel_connector *connector)
>  
>  		connector->base.state->scaling_mode = DRM_MODE_SCALE_ASPECT;
>  
> -		connector->base.display_info.panel_orientation =
> -			vlv_dsi_get_panel_orientation(connector);
> -		drm_connector_init_panel_orientation_property(
> -				&connector->base,
> +		orientation = drm_get_panel_orientation_quirk(
>  				connector->panel.fixed_mode->hdisplay,
>  				connector->panel.fixed_mode->vdisplay);
> +		if (orientation != DRM_MODE_PANEL_ORIENTATION_UNKNOWN)
> +			connector->base.display_info.panel_orientation = orientation;
> +		else
> +			connector->base.display_info.panel_orientation =
> +				vlv_dsi_get_panel_orientation(connector);
> +
> +		drm_connector_init_panel_orientation_property(&connector->base);
>  	}
>  }
>  
> diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
> index 47e749b74e5f..c2992f7a0dd5 100644
> --- a/include/drm/drm_connector.h
> +++ b/include/drm/drm_connector.h
> @@ -1370,7 +1370,7 @@ void drm_connector_set_link_status_property(struct drm_connector *connector,
>  void drm_connector_set_vrr_capable_property(
>  		struct drm_connector *connector, bool capable);
>  int drm_connector_init_panel_orientation_property(
> -	struct drm_connector *connector, int width, int height);
> +	struct drm_connector *connector);
>  int drm_connector_attach_max_bpc_property(struct drm_connector *connector,
>  					  int min, int max);

-- 
Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2019-06-11  8:08 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-11  4:03 [PATCH v2 0/5] Panel rotation patches Derek Basehore
2019-06-11  4:03 ` Derek Basehore
2019-06-11  4:03 ` Derek Basehore
2019-06-11  4:03 ` [PATCH 1/5] drm/panel: Add helper for reading DT rotation Derek Basehore
2019-06-11  4:03   ` Derek Basehore
2019-06-11  4:03   ` Derek Basehore
2019-06-12 21:18   ` Sam Ravnborg
2019-06-12 21:18     ` Sam Ravnborg
2019-06-12 21:18     ` Sam Ravnborg
2019-06-15  0:43     ` dbasehore .
2019-06-15  0:43       ` dbasehore .
2019-06-15  0:43       ` dbasehore .
2019-06-15  0:44       ` dbasehore .
2019-06-15  0:44         ` dbasehore .
2019-06-15  0:44         ` dbasehore .
2019-06-12 21:20   ` Sam Ravnborg
2019-06-12 21:20     ` Sam Ravnborg
2019-06-12 21:20     ` Sam Ravnborg
2019-06-14  0:32     ` dbasehore .
2019-06-14  0:32       ` dbasehore .
2019-06-14  0:32       ` dbasehore .
2019-06-11  4:03 ` [PATCH 2/5] dt-bindings: display/panel: Expand rotation documentation Derek Basehore
2019-06-11  4:03   ` Derek Basehore
2019-06-11  4:03   ` Derek Basehore
2019-06-11 15:25   ` Rob Herring
2019-06-11 15:25     ` Rob Herring
2019-06-11 15:25     ` Rob Herring
2019-06-11 22:01     ` dbasehore .
2019-06-11 22:01       ` dbasehore .
2019-06-11 22:01       ` dbasehore .
2019-06-13 12:51       ` Rob Herring
2019-06-13 12:51         ` Rob Herring
2019-06-13 12:51         ` Rob Herring
2019-06-13 21:00         ` dbasehore .
2019-06-13 21:00           ` dbasehore .
2019-06-13 21:00           ` dbasehore .
2019-06-11  4:03 ` [PATCH 3/5] drm/panel: Add attach/detach callbacks Derek Basehore
2019-06-11  4:03   ` Derek Basehore
2019-06-11  4:03   ` Derek Basehore
2019-06-11  8:57   ` Daniel Vetter
2019-06-11  8:57     ` Daniel Vetter
2019-06-11  8:57     ` Daniel Vetter
2019-06-12  0:25     ` dbasehore .
2019-06-12  0:25       ` dbasehore .
2019-06-12  0:25       ` dbasehore .
2019-06-21  1:57       ` dbasehore .
2019-06-21  1:57         ` dbasehore .
2019-06-21  1:57         ` dbasehore .
2019-06-21  9:19       ` Thierry Reding
2019-06-21  9:19         ` Thierry Reding
2019-06-21  9:19         ` Thierry Reding
2019-06-22  1:54         ` dbasehore .
2019-06-22  1:54           ` dbasehore .
2019-06-22  1:54           ` dbasehore .
2019-06-11  4:03 ` [PATCH 4/5] drm/connector: Split out orientation quirk detection Derek Basehore
2019-06-11  4:03   ` Derek Basehore
2019-06-11  4:03   ` Derek Basehore
2019-06-11  8:08   ` Jani Nikula [this message]
2019-06-11  8:08     ` Jani Nikula
2019-06-11  8:08     ` Jani Nikula
2019-06-11  8:54     ` Hans de Goede
2019-06-11  8:54       ` Hans de Goede
2019-06-11  8:54       ` Hans de Goede
2019-06-12  0:16       ` dbasehore .
2019-06-12  0:16         ` dbasehore .
2019-06-12  0:16         ` dbasehore .
2019-06-12 12:33         ` Hans de Goede
2019-06-12 12:33           ` Hans de Goede
2019-06-12 12:33           ` Hans de Goede
2019-06-14  0:36           ` dbasehore .
2019-06-14  0:36             ` dbasehore .
2019-06-14  0:36             ` dbasehore .
2019-06-11  4:03 ` [PATCH 5/5] drm/mtk: add panel orientation property Derek Basehore
2019-06-11  4:03   ` Derek Basehore
2019-06-11  4:03   ` Derek Basehore
2019-06-11  4:24 ` ✗ Fi.CI.BAT: failure for Panel rotation patches (rev2) Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2019-06-11  0:22 [PATCH 0/5] Panel rotation patches Derek Basehore
2019-06-11  0:22 ` [PATCH 4/5] drm/connector: Split out orientation quirk detection Derek Basehore
2019-06-11  0:22   ` Derek Basehore
2019-06-11  0:22   ` Derek Basehore

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zhmoy270.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=airlied@linux.ie \
    --cc=ck.hu@mediatek.com \
    --cc=dbasehore@chromium.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=j.w.r.degoede@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=matthias.bgg@gmail.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=p.zabel@pengutronix.de \
    --cc=robh+dt@kernel.org \
    --cc=sam@ravnborg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.