Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v3 06/13] drm/i915: Add plumbing for digital connector state.
Date: Wed, 12 Apr 2017 09:56:24 +0200	[thread overview]
Message-ID: <20170412075624.fepcnzedij3e6jsi@phenom.ffwll.local> (raw)
In-Reply-To: <1491815239-10685-7-git-send-email-maarten.lankhorst@linux.intel.com>

On Mon, Apr 10, 2017 at 11:07:12AM +0200, Maarten Lankhorst wrote:
> +int intel_digital_connector_atomic_get_property(struct drm_connector *connector,
> +						const struct drm_connector_state *state,
> +						struct drm_property *property,
> +						uint64_t *val)
> +{
> +	struct drm_device *dev = connector->dev;
> +	struct drm_i915_private *dev_priv = to_i915(dev);
> +	struct intel_digital_connector_state *intel_conn_state =
> +		to_intel_digital_connector_state(state);
> +
> +	if (property == dev->mode_config.scaling_mode_property)
> +		*val = intel_conn_state->panel.fitting_mode;
> +	else if (property == dev_priv->force_audio_property)
> +		*val = intel_conn_state->force_audio;
> +	else if (property == dev_priv->broadcast_rgb_property)
> +		*val = intel_conn_state->broadcast_rgb;
> +	else if (property == dev->mode_config.aspect_ratio_property) {
> +		switch (intel_conn_state->aspect_ratio) {
> +		case HDMI_PICTURE_ASPECT_NONE: *val = DRM_MODE_PICTURE_ASPECT_NONE; break;
> +		case HDMI_PICTURE_ASPECT_4_3: *val = DRM_MODE_PICTURE_ASPECT_4_3; break;
> +		case HDMI_PICTURE_ASPECT_16_9: *val = DRM_MODE_PICTURE_ASPECT_16_9; break;
> +		default:
> +			MISSING_CASE(intel_conn_state->aspect_ratio);
> +			return -EINVAL;
> +		}

So I'm annoying, but I think this is a really good time to standardize all
these and push them into drm_connector_state. With docs and everything.
They are already core properties, might as well properly decode them if
they're present.

I can help with typing the kernel-doc for this stuff, right now the DOC:
section in drm_connector.c only documents the standard props, none of the
ones you can add by calling one of the helpers.

Sorry I'm this late with this feedback, but I feel fairly strongly about
decoding standardized props in the core and putting them into shared
structs.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-04-12  7:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-10  9:07 [PATCH v3 00/13] drm/i915: Convert connector properties to atomic Maarten Lankhorst
2017-04-10  9:07 ` [PATCH v3 01/13] drm/i915: Remove unused members from intel_tv.c Maarten Lankhorst
2017-04-10  9:51   ` Chris Wilson
2017-04-10  9:07 ` [PATCH v3 02/13] drm/i915: Convert intel_tv connector properties to atomic, v5 Maarten Lankhorst
2017-04-10  9:07 ` [PATCH v3 03/13] drm/i915: Convert intel_dp_mst connector properties to atomic Maarten Lankhorst
2017-04-10 10:51   ` [PATCH v3 2.5/13] drm/i915: Remove unused dp properties for dp-mst Maarten Lankhorst
2017-04-12  7:47     ` Daniel Vetter
2017-04-10  9:07 ` [PATCH v3 04/13] drm/i915: Convert intel_crt connector properties to atomic Maarten Lankhorst
2017-04-12  7:48   ` Daniel Vetter
2017-04-10  9:07 ` [PATCH v3 05/13] drm/i915: Convert intel DVO connector " Maarten Lankhorst
2017-04-12  7:49   ` Daniel Vetter
2017-04-10  9:07 ` [PATCH v3 06/13] drm/i915: Add plumbing for digital connector state Maarten Lankhorst
2017-04-12  7:56   ` Daniel Vetter [this message]
2017-04-10  9:07 ` [PATCH v3 07/13] drm/i915: Convert DSI connector properties to atomic Maarten Lankhorst
2017-04-10  9:07 ` [PATCH v3 08/13] drm/i915: Convert LVDS " Maarten Lankhorst
2017-04-10  9:07 ` [PATCH v3 09/13] drm/i915: Make intel_dp->has_audio reflect hw state only Maarten Lankhorst
2017-04-10  9:07 ` [PATCH v3 10/13] drm/i915: Convert intel_dp properties to atomic Maarten Lankhorst
2017-04-10  9:07 ` [PATCH v3 11/13] drm/i915: Convert intel_hdmi connector " Maarten Lankhorst
2017-04-10  9:07 ` [PATCH v3 12/13] drm/i915: Handle force_audio correctly in intel_sdvo Maarten Lankhorst
2017-04-10  9:07 ` [PATCH v3 13/13] drm/i915: Convert intel_sdvo connector properties to atomic Maarten Lankhorst
2017-04-10  9:43 ` ✓ Fi.CI.BAT: success for drm/i915: Convert connector properties to atomic. (rev2) 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=20170412075624.fepcnzedij3e6jsi@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=maarten.lankhorst@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox