From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v6 02/12] drm/atomic: Add support for custom scaling mode properties, v2
Date: Tue, 2 May 2017 13:06:51 +0200 [thread overview]
Message-ID: <097b56e5-72e5-f4d6-3fa3-b32962e0da6e@linux.intel.com> (raw)
In-Reply-To: <20170502094340.flq5xn2afcv3jtu2@phenom.ffwll.local>
Op 02-05-17 om 11:44 schreef Daniel Vetter:
> On Mon, May 01, 2017 at 03:37:54PM +0200, Maarten Lankhorst wrote:
>> Some connectors may not allow all scaling mode properties, this function will allow
>> creating the scaling mode property with only the supported subset. It also wires up
>> this state for atomic.
>>
>> This will make it possible to convert i915 connectors to atomic.
>>
>> Changes since v1:
>> - Add DRM_MODE_PROP_ENUM flag to drm_property_create
>> - Use the correct index in drm_property_add_enum.
>> - Add DocBook for function (Sean Paul).
>> - Warn if less than 2 valid scaling modes are passed.
>> - Remove level of indent. (Sean Paul)
>>
>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>> ---
>> drivers/gpu/drm/drm_atomic.c | 4 +++
>> drivers/gpu/drm/drm_connector.c | 58 +++++++++++++++++++++++++++++++++++++++++
>> include/drm/drm_connector.h | 10 +++++++
>> 3 files changed, 72 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
>> index 77bb36e956db..c7f91dcebbe9 100644
>> --- a/drivers/gpu/drm/drm_atomic.c
>> +++ b/drivers/gpu/drm/drm_atomic.c
>> @@ -1125,6 +1125,8 @@ int drm_atomic_connector_set_property(struct drm_connector *connector,
>> state->link_status = val;
>> } else if (property == config->aspect_ratio_property) {
>> state->picture_aspect_ratio = val;
>> + } else if (property == connector->scaling_mode_property) {
>> + state->scaling_mode = val;
> Can't we still handle mode_config->scaling_mode_property as fallback?
> Seems a lot more consistent to me ...
>
>> } else if (connector->funcs->atomic_set_property) {
>> return connector->funcs->atomic_set_property(connector,
>> state, property, val);
>> @@ -1203,6 +1205,8 @@ drm_atomic_connector_get_property(struct drm_connector *connector,
>> *val = state->link_status;
>> } else if (property == config->aspect_ratio_property) {
>> *val = state->picture_aspect_ratio;
>> + } else if (property == connector->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/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
>> index 9f847615ac74..b3912f2e48c6 100644
>> --- a/drivers/gpu/drm/drm_connector.c
>> +++ b/drivers/gpu/drm/drm_connector.c
>> @@ -961,6 +961,64 @@ int drm_mode_create_scaling_mode_property(struct drm_device *dev)
>> EXPORT_SYMBOL(drm_mode_create_scaling_mode_property);
>>
>> /**
>> + * drm_mode_connector_attach_scaling_mode_property - attach atomic scaling mode property
>> + * @connector: connector to attach scaling mode property on.
>> + * @scaling_mode_mask: or'ed mask of BIT(DRM_MODE_SCALE_\*).
>> + *
>> + * This is used to add support for scaling mode to atomic drivers.
>> + * The scaling mode will be set to &struct drm_connector_state->picture_aspect_ratio
> s/->/./ to get a real link
>
>> + * and can be used from &struct drm_connector_helper_funcs->atomic_check for validation.
> Same here, plus needs &.
>
> Please check the html output when typing docs ...
>
> Also please link to drm_mode_create_scaling_mode_property() and from the
> kerneldoc of that to this one here.
Ah right, thanks.
>
>> + *
>> + * Returns:
>> + * Zero on success, negative errno on failure.
>> + */
>> +int drm_mode_connector_attach_scaling_mode_property(struct drm_connector *connector,
>> + u32 scaling_mode_mask)
> Usual prefix is just drm_connector_ (yes I know we're not consistent here,
> yet).
>
> With those nits: Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
Will rename. :)
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-05-02 11:06 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-01 13:37 [PATCH v6 00/12] drm/i915: Convert connector properties to atomic Maarten Lankhorst
2017-05-01 13:37 ` [PATCH v6 01/12] drm/atomic: Handle picture_aspect_ratio in atomic core Maarten Lankhorst
2017-05-01 18:27 ` Manasi Navare
2017-05-02 9:54 ` Daniel Vetter
2017-05-01 13:37 ` [PATCH v6 02/12] drm/atomic: Add support for custom scaling mode properties, v2 Maarten Lankhorst
2017-05-02 9:44 ` Daniel Vetter
2017-05-02 11:06 ` Maarten Lankhorst [this message]
2017-05-01 13:37 ` [PATCH v6 03/12] drm/i915: Use atomic scaling_mode instead of panel.fitting_mode Maarten Lankhorst
2017-05-01 13:37 ` [PATCH v6 04/12] drm/i915: Use per-connector scaling mode property Maarten Lankhorst
2017-05-01 13:37 ` [PATCH v6 05/12] drm/i915: Add plumbing for digital connector state, v3 Maarten Lankhorst
2017-05-02 9:56 ` Daniel Vetter
2017-05-30 10:28 ` Maarten Lankhorst
2017-05-01 13:37 ` [PATCH v6 06/12] drm/i915: Convert DSI connector properties to atomic Maarten Lankhorst
2017-05-01 13:37 ` [PATCH v6 07/12] drm/i915: Convert LVDS " Maarten Lankhorst
2017-05-01 13:38 ` [PATCH v6 08/12] drm/i915: Make intel_dp->has_audio reflect hw state only Maarten Lankhorst
2017-05-01 13:38 ` [PATCH v6 09/12] drm/i915: Convert intel_dp properties to atomic, v2 Maarten Lankhorst
2017-05-01 13:38 ` [PATCH v6 10/12] drm/i915: Convert intel_hdmi connector properties to atomic Maarten Lankhorst
2017-05-01 13:38 ` [PATCH v6 11/12] drm/i915: Handle force_audio correctly in intel_sdvo Maarten Lankhorst
2017-05-01 13:38 ` [PATCH v6 12/12] drm/i915: Convert intel_sdvo connector properties to atomic Maarten Lankhorst
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=097b56e5-72e5-f4d6-3fa3-b32962e0da6e@linux.intel.com \
--to=maarten.lankhorst@linux.intel.com \
--cc=daniel@ffwll.ch \
--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