Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Subject: [PATCH v4 1/9] drm/atomic: Handle aspect ratio and scaling mode in core
Date: Wed, 12 Apr 2017 12:49:59 +0200	[thread overview]
Message-ID: <1491994207-25965-2-git-send-email-maarten.lankhorst@linux.intel.com> (raw)
In-Reply-To: <1491994207-25965-1-git-send-email-maarten.lankhorst@linux.intel.com>

This is required to for i915 to convert connector properties to atomic.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: dri-devel@lists.freedesktop.org
---
 drivers/gpu/drm/drm_atomic.c | 8 ++++++++
 include/drm/drm_connector.h  | 3 +++
 2 files changed, 11 insertions(+)

diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
index f32506a7c1d6..052cfe2376f8 100644
--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -1123,6 +1123,10 @@ int drm_atomic_connector_set_property(struct drm_connector *connector,
 		 */
 		if (state->link_status != DRM_LINK_STATUS_GOOD)
 			state->link_status = val;
+	} else if (property == config->aspect_ratio_property) {
+		state->picture_aspect_ratio = val;
+	} else if (property == config->scaling_mode_property) {
+		state->scaling_mode = val;
 	} else if (connector->funcs->atomic_set_property) {
 		return connector->funcs->atomic_set_property(connector,
 				state, property, val);
@@ -1199,6 +1203,10 @@ drm_atomic_connector_get_property(struct drm_connector *connector,
 		*val = state->tv.hue;
 	} else if (property == config->link_status_property) {
 		*val = state->link_status;
+	} else if (property == config->aspect_ratio_property) {
+		*val = state->picture_aspect_ratio;
+	} else if (property == config->scaling_mode_property) {
+		*val = state->scaling_mode;
 	} else if (connector->funcs->atomic_get_property) {
 		return connector->funcs->atomic_get_property(connector,
 				state, property, val);
diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
index 4eeda120e46d..3b819cd1d858 100644
--- a/include/drm/drm_connector.h
+++ b/include/drm/drm_connector.h
@@ -326,6 +326,9 @@ struct drm_connector_state {
 	struct drm_atomic_state *state;
 
 	struct drm_tv_connector_state tv;
+
+	unsigned int picture_aspect_ratio;
+	unsigned int scaling_mode;
 };
 
 /**
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-04-12 10:49 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-12 10:49 [PATCH v4 0/9] drm/i915: Convert connector properties to atomic Maarten Lankhorst
2017-04-12 10:49 ` Maarten Lankhorst [this message]
2017-04-13  9:15   ` [PATCH v4.1 01/9] drm/atomic: Handle aspect ratio and scaling mode in core, v2 Maarten Lankhorst
2017-04-19 15:43     ` Daniel Vetter
2017-04-24 12:01       ` Maarten Lankhorst
2017-05-02  8:12         ` Daniel Vetter
2017-05-02  8:17           ` Maarten Lankhorst
2017-04-12 10:50 ` [PATCH v4 2/9] drm/i915: Add plumbing for digital connector state, v2 Maarten Lankhorst
2017-04-19 15:48   ` Daniel Vetter
2017-04-20  6:11     ` Maarten Lankhorst
2017-04-12 10:50 ` [PATCH v4 3/9] drm/i915: Convert DSI connector properties to atomic Maarten Lankhorst
2017-04-12 10:50 ` [PATCH v4 4/9] drm/i915: Convert LVDS " Maarten Lankhorst
2017-04-12 10:50 ` [PATCH v4 5/9] drm/i915: Make intel_dp->has_audio reflect hw state only Maarten Lankhorst
2017-04-12 10:50 ` [PATCH v4 6/9] drm/i915: Convert intel_dp properties to atomic Maarten Lankhorst
2017-04-19 15:53   ` Daniel Vetter
2017-04-20  8:28     ` Maarten Lankhorst
2017-04-12 10:50 ` [PATCH v4 7/9] drm/i915: Convert intel_hdmi connector " Maarten Lankhorst
2017-04-12 10:50 ` [PATCH v4 8/9] drm/i915: Handle force_audio correctly in intel_sdvo Maarten Lankhorst
2017-04-12 10:50 ` [PATCH v4 9/9] drm/i915: Convert intel_sdvo connector properties to atomic Maarten Lankhorst
2017-04-19 15:58   ` Daniel Vetter
2017-04-12 11:13 ` ✓ Fi.CI.BAT: success for drm/i915: Convert connector properties to atomic. (rev4) Patchwork
2017-04-13  9:34 ` ✓ Fi.CI.BAT: success for drm/i915: Convert connector properties to atomic. (rev5) 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=1491994207-25965-2-git-send-email-maarten.lankhorst@linux.intel.com \
    --to=maarten.lankhorst@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.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