[Intel-gfx] [PATCH v3 06/13] drm/i915: Add plumbing for digital connector state.
Daniel Vetter
daniel at ffwll.ch
Wed Apr 12 07:56:24 UTC 2017
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
More information about the Intel-gfx
mailing list