From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vandana Kannan Subject: Re: [PATCH 3/6] drm/i915: Add support for DRRS to switch RR Date: Fri, 07 Mar 2014 14:11:30 +0530 Message-ID: <5319863A.9090308@intel.com> References: <1394012589-7276-1-git-send-email-vandana.kannan@intel.com> <1394012589-7276-4-git-send-email-vandana.kannan@intel.com> <20140305095810.GB20735@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 10C08FB208 for ; Fri, 7 Mar 2014 00:41:33 -0800 (PST) In-Reply-To: <20140305095810.GB20735@nuc-i3427.alporthouse.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: Chris Wilson Cc: "intel-gfx@lists.freedesktop.org" List-Id: intel-gfx@lists.freedesktop.org On Mar-05-2014 3:28 PM, Chris Wilson wrote: > On Wed, Mar 05, 2014 at 03:13:06PM +0530, Vandana Kannan wrote: >> +void intel_dp_set_drrs_state(struct drm_device *dev, int refresh_rate) >> +{ >> + struct drm_i915_private *dev_priv = dev->dev_private; >> + struct intel_encoder *encoder; >> + struct intel_dp *intel_dp = NULL; >> + struct intel_crtc_config *config = NULL; >> + struct intel_crtc *intel_crtc = NULL; >> + struct intel_connector *intel_connector = dev_priv->drrs.connector; >> + u32 reg, val; >> + int index = 0; > > This routine touches a register and reads state guarded by modeset locks, > I don't see any documentation to make sure the caller complies with > holding the right locks. > > And since this function isn't used yet, I can't check that the callers > are correct at this point in time either. Please, please do document > locking requirements on new functions. > -Chris > Thanks for your inputs. I have added a short description explaining that the locking may be required for future implementations/enhancements of DRRS. I have pushed the revised set of patches. -Vandana