From: Hans de Goede <hdegoede@redhat.com>
To: Daniel Vetter <daniel.vetter@intel.com>,
Jani Nikula <jani.nikula@linux.intel.com>,
Sean Paul <seanpaul@chromium.org>,
David Airlie <airlied@linux.ie>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
Bastien Nocera <hadess@hadess.net>
Subject: [PATCH 3/3] drm/i915: Add "panel orientation" property to the panel connector
Date: Fri, 08 Sep 2017 11:54:44 +0000 [thread overview]
Message-ID: <20170908115444.19122-4-hdegoede@redhat.com> (raw)
In-Reply-To: <20170908115444.19122-1-hdegoede@redhat.com>
For now this is always set to DRM_MODE_PANEL_ORIENTATION_UNKNOWN
unless there is a dmi based quirk overriding the value.
In the future we should probably provide an initial value based on
the VBT (at least for some panel types).
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/gpu/drm/i915/intel_panel.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
index 72f8cbb237b1..4a52c9d5790a 100644
--- a/drivers/gpu/drm/i915/intel_panel.c
+++ b/drivers/gpu/drm/i915/intel_panel.c
@@ -1926,6 +1926,22 @@ int intel_panel_init(struct intel_panel *panel,
struct drm_display_mode *alt_fixed_mode,
struct drm_display_mode *downclock_mode)
{
+ struct intel_connector *intel_connector + container_of(panel, struct intel_connector, panel);
+ int ret;
+
+ if (fixed_mode) {
+ ret = drm_connector_create_panel_orientation_property(
+ intel_connector->base.dev);
+ if (ret)
+ return ret;
+
+ drm_connector_attach_panel_orientation_property(
+ &intel_connector->base,
+ fixed_mode->hdisplay, fixed_mode->vdisplay,
+ DRM_MODE_PANEL_ORIENTATION_UNKNOWN);
+ }
+
intel_panel_init_backlight_funcs(panel);
panel->fixed_mode = fixed_mode;
--
2.13.4
next prev parent reply other threads:[~2017-09-08 11:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-08 11:54 [PATCH 0/3] fb/drm: Add support for a panel-orientation connector prop Hans de Goede
2017-09-08 11:54 ` [PATCH 1/3] video: fb: Make fbcon dmi quirks usuable for drm drivers too Hans de Goede
2017-09-08 11:54 ` [PATCH 2/3] drm: Add support for a panel-orientation connector property Hans de Goede
2017-09-08 11:54 ` Hans de Goede [this message]
2017-09-08 12:05 ` [PATCH 0/3] fb/drm: Add support for a panel-orientation connector prop Daniel Vetter
2017-09-08 15:08 ` Hans de Goede
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=20170908115444.19122-4-hdegoede@redhat.com \
--to=hdegoede@redhat.com \
--cc=airlied@linux.ie \
--cc=b.zolnierkie@samsung.com \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hadess@hadess.net \
--cc=jani.nikula@linux.intel.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=seanpaul@chromium.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 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).