From: Ramalingam C <ramalingam.c@intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: daniel.vetter@ffwll.ch, intel-gfx@lists.freedesktop.org,
rodrigo.vivi@intel.com, paulo.r.zanoni@intel.com
Subject: Re: [RFC PATCH 09/18] drm/i915: Cloned mode check
Date: Mon, 29 Jun 2015 17:18:21 +0530 [thread overview]
Message-ID: <55913085.6050301@intel.com> (raw)
In-Reply-To: <20150626170840.GG30960@phenom.ffwll.local>
On Friday 26 June 2015 10:38 PM, Daniel Vetter wrote:
> On Fri, Jun 26, 2015 at 07:21:53PM +0530, Ramalingam C wrote:
>> If crtc is in clone mode, DRRS will be disabled. Because if the both
>> the displays are not sharing the same vrefresh, then userspace
>> activities based on vsync will go for toss.
>>
>> Clone mode will be rechecked on every restarting Idleness DRRS events.
>>
>> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
>> ---
>> drivers/gpu/drm/i915/intel_drrs.c | 36 +++++++++++++++++++++++++++++++++++-
>> 1 file changed, 35 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_drrs.c b/drivers/gpu/drm/i915/intel_drrs.c
>> index e5d8bcd..42b420d 100644
>> --- a/drivers/gpu/drm/i915/intel_drrs.c
>> +++ b/drivers/gpu/drm/i915/intel_drrs.c
>> @@ -16,6 +16,7 @@
>>
>> #include <drm/i915_drm.h>
>> #include <linux/delay.h>
>> +#include <linux/list.h>
>>
>> #include "i915_drv.h"
>> #include "intel_drv.h"
>> @@ -85,6 +86,31 @@ int get_free_drrs_struct_index(struct drm_i915_private *dev_priv)
>> return -EBUSY;
>> }
>>
>> +/*
>> + * TODO: This is identifying the multiple active crtcs at a time.
>> + * Here we assume that this is clone state and disable DRRS.
>> + * But need to implement a proper method to find the real cloned mode
>> + * state. DRRS need not be disabled incase of multiple crtcs with
>> + * different content.
>> + */
> This is a pretty big hack. Why do you need it? fb tracking should keep any
> display in the high mode as long as there's activity, so as long as
> userspace flips both buffers for both pipes (which is should for cloned
> mode) they'll both be running at max.
Yup. This is not needed for Idleness as fb tracking will keep the DRRS
at High refresh rate.
But at content based DRRS, we had some concern from android Userspace
team that we cant
support content based DRRS for cloned modes (eDP + HDMI or DSI + HDMI).
Of course at this point in time, we can enable the DRRS for all
scenarios and test. Based on results we can plan ahead.
>
> And for non-cloned mode (e.g. video only on external TV) things will be
> controlled independantly.
>
> Smells a lot like trying to encode policy instead of making sure that the
> resulting behaviour matches what we want. And I think it should already.
> -Daniel
>
>> +
>> +bool is_cloned_mode_active(struct drm_device *dev)
>> +{
>> + struct drm_crtc *crtc = NULL, *tmp_crtc;
>> +
>> + list_for_each_entry(tmp_crtc, &dev->mode_config.crtc_list, head) {
>> + if (crtc && intel_crtc_active(tmp_crtc)) {
>> + DRM_DEBUG_KMS(
>> + "more than one crtc active. Declared as clonec mode\n");
>> + return true;
>> + }
>> +
>> + if (intel_crtc_active(tmp_crtc))
>> + crtc = tmp_crtc;
>> + }
>> + return false;
>> +}
>> +
>> void intel_set_drrs_state(struct i915_drrs *drrs)
>> {
>> struct drrs_info *drrs_state;
>> @@ -158,7 +184,10 @@ static void intel_idleness_drrs_work_fn(struct work_struct *__work)
>>
>> panel = &drrs->connector->panel;
>>
>> - /* TODO: If DRRS is not supported on clone mode act here */
>> + /* Double check if the dual-display mode is active. */
>> + if (drrs->is_clone)
>> + return;
>> +
>> mutex_lock(&drrs->drrs_mutex);
>> if (panel->target_mode != NULL)
>> DRM_ERROR("FIXME: We shouldn't be here\n");
>> @@ -192,6 +221,11 @@ static void intel_enable_idleness_drrs(struct i915_drrs *drrs)
>>
>> mutex_lock(&drrs->drrs_mutex);
>>
>> + drrs->is_clone = is_cloned_mode_active(drrs->connector->base.dev);
>> +
>> + if (drrs->is_clone)
>> + return;
>> +
>> /* Capturing the deferred request for disable_drrs */
>> if (drrs->drrs_state.type == SEAMLESS_DRRS_SUPPORT_SW &&
>> drrs->encoder_ops->is_drrs_hr_state_pending) {
>> --
>> 1.7.9.5
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Thanks,
--Ram
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-06-29 11:56 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-26 13:51 [RFC PATCH 00/18] Generic DRRS implementation across the encoders Ramalingam C
2015-06-26 13:51 ` [RFC PATCH 01/18] drm/i915: Removing the eDP specific DRRS implementation Ramalingam C
2015-06-26 16:50 ` Daniel Vetter
2015-06-29 11:24 ` Ramalingam C
2015-06-26 13:51 ` [RFC PATCH 02/18] drm/i915: Generic DRRS state Machine Ramalingam C
2015-06-26 13:51 ` [RFC PATCH 03/18] drm/i915: Addition of the drrs_min_vrefresh in VBT Ramalingam C
2015-06-26 13:51 ` [RFC PATCH 04/18] drm/i915: Implementation of Generic DSI DRRS Ramalingam C
2015-06-26 13:51 ` [RFC PATCH 05/18] drm/i915: Adjusting the pclk for dual link and burst mode Ramalingam C
2015-06-26 13:51 ` [RFC PATCH 06/18] drm/i915: VLV dsi drrs support Ramalingam C
2015-06-26 13:51 ` [RFC PATCH 07/18] drm/i915: Generic eDP DRRS implementation Ramalingam C
2015-06-26 13:51 ` [RFC PATCH 08/18] drm/i915: VLV eDP DRRS methods Ramalingam C
2015-06-26 13:51 ` [RFC PATCH 09/18] drm/i915: Cloned mode check Ramalingam C
2015-06-26 17:08 ` Daniel Vetter
2015-06-26 17:14 ` Chris Wilson
2015-06-26 17:38 ` Daniel Vetter
2015-06-29 11:48 ` Ramalingam C [this message]
2015-06-29 16:16 ` Daniel Vetter
2015-06-26 13:51 ` [RFC PATCH 10/18] drm/i915: Initializing DRRS for all connectors Ramalingam C
2015-06-26 17:12 ` Daniel Vetter
2015-06-29 14:52 ` Ramalingam C
2015-06-26 13:51 ` [RFC PATCH 11/18] drm/i915: Updating the crtc modes in DRRS transitions Ramalingam C
2015-06-26 17:11 ` Daniel Vetter
2015-06-29 14:58 ` Ramalingam C
2015-06-29 16:23 ` Daniel Vetter
2015-06-26 13:51 ` [RFC PATCH 12/18] drm/i915: Redesigning dp_set_m_n to receive divider values Ramalingam C
2015-06-26 13:51 ` [RFC PATCH 13/18] drm/i915: MEDIA_RR support in general DRRS state machine Ramalingam C
2015-06-26 13:51 ` [RFC PATCH 14/18] drm/i915: MEDIA_RR support in eDP DRRS module Ramalingam C
2015-06-26 13:51 ` [RFC PATCH 15/18] drm/i915: MEDIA_RR support in DSI " Ramalingam C
2015-06-26 13:52 ` [RFC PATCH 16/18] drm/i915: Filtering media playback DRRS requests Ramalingam C
2015-06-26 13:52 ` [RFC PATCH 17/18] drm/i915: Addition of downclock mode to connector modelist Ramalingam C
2015-06-26 13:52 ` [RFC PATCH 18/18] drm/i915: Connector property for DRRS capability Ramalingam C
2015-06-26 17:16 ` [RFC PATCH 00/18] Generic DRRS implementation across the encoders Daniel Vetter
2015-06-29 11:22 ` Ramalingam C
2015-06-29 16:27 ` Daniel Vetter
2015-06-30 6:29 ` Ramalingam C
2015-06-30 10:02 ` Daniel Vetter
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=55913085.6050301@intel.com \
--to=ramalingam.c@intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=paulo.r.zanoni@intel.com \
--cc=rodrigo.vivi@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