All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>,
	dri-devel@lists.freedesktop.org,
	Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH resend 2/2] drm/i915/dp: Use BDB_GENERAL_FEATURES VBT block info for builtin panel-orientation
Date: Fri, 28 Feb 2020 16:58:06 +0200	[thread overview]
Message-ID: <20200228145806.GG13686@intel.com> (raw)
In-Reply-To: <20200228114110.187792-3-hdegoede@redhat.com>

On Fri, Feb 28, 2020 at 12:41:10PM +0100, Hans de Goede wrote:
> Some devices with a builtin panel have the panel mounted upside down,
> this is indicated by the rotate_180 bit in the BDB_GENERAL_FEATURES VBT
> block.
> 
> We store this info in dev_priv->vbt.orientation, use this to set the
> connector's orientation property so that fbcon and userspace will show
> the image the right way up on devices with an upside-down mounted panel.
> 
> This fixes the image being upside-down on a Teclast X89 tablet.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 2db8d46f61a1..c31f5233941c 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -7608,9 +7608,8 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
>  	intel_panel_setup_backlight(connector, pipe);
>  
>  	if (fixed_mode) {
> -		/* We do not know the orientation, but their might be a quirk */
>  		drm_connector_set_panel_orientation_with_quirk(connector,
> -				DRM_MODE_PANEL_ORIENTATION_UNKNOWN,
> +				dev_priv->vbt.orientation,

That's the non-DSI specific one I presume... yes.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

>  				fixed_mode->hdisplay, fixed_mode->vdisplay);
>  	}
>  
> -- 
> 2.24.1

-- 
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>,
	dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH resend 2/2] drm/i915/dp: Use BDB_GENERAL_FEATURES VBT block info for builtin panel-orientation
Date: Fri, 28 Feb 2020 16:58:06 +0200	[thread overview]
Message-ID: <20200228145806.GG13686@intel.com> (raw)
In-Reply-To: <20200228114110.187792-3-hdegoede@redhat.com>

On Fri, Feb 28, 2020 at 12:41:10PM +0100, Hans de Goede wrote:
> Some devices with a builtin panel have the panel mounted upside down,
> this is indicated by the rotate_180 bit in the BDB_GENERAL_FEATURES VBT
> block.
> 
> We store this info in dev_priv->vbt.orientation, use this to set the
> connector's orientation property so that fbcon and userspace will show
> the image the right way up on devices with an upside-down mounted panel.
> 
> This fixes the image being upside-down on a Teclast X89 tablet.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 2db8d46f61a1..c31f5233941c 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -7608,9 +7608,8 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
>  	intel_panel_setup_backlight(connector, pipe);
>  
>  	if (fixed_mode) {
> -		/* We do not know the orientation, but their might be a quirk */
>  		drm_connector_set_panel_orientation_with_quirk(connector,
> -				DRM_MODE_PANEL_ORIENTATION_UNKNOWN,
> +				dev_priv->vbt.orientation,

That's the non-DSI specific one I presume... yes.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

>  				fixed_mode->hdisplay, fixed_mode->vdisplay);
>  	}
>  
> -- 
> 2.24.1

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-02-28 14:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-28 11:41 [PATCH resend 0/2] drm/i915: Some upside-down panel handling fixes Hans de Goede
2020-02-28 11:41 ` [Intel-gfx] " Hans de Goede
2020-02-28 11:41 ` [PATCH resend 1/2] drm/i915/dsi: Remove readback of panel orientation on BYT / CHT Hans de Goede
2020-02-28 11:41   ` [Intel-gfx] " Hans de Goede
2020-02-28 11:41 ` [PATCH resend 2/2] drm/i915/dp: Use BDB_GENERAL_FEATURES VBT block info for builtin panel-orientation Hans de Goede
2020-02-28 11:41   ` [Intel-gfx] " Hans de Goede
2020-02-28 14:58   ` Ville Syrjälä [this message]
2020-02-28 14:58     ` Ville Syrjälä
2020-02-28 15:18 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Some upside-down panel handling fixes Patchwork
2020-02-28 15:47 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-03-01  9:24 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

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=20200228145806.GG13686@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hdegoede@redhat.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rodrigo.vivi@intel.com \
    /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.