From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm: allocate crtc mutex separately from crtc Date: Sat, 19 Oct 2013 12:41:08 +0200 Message-ID: <20131019104108.GA4830@phenom.ffwll.local> References: <1381966519-4185-1-git-send-email-ihadzic@research.bell-labs.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ea0-f181.google.com (mail-ea0-f181.google.com [209.85.215.181]) by gabe.freedesktop.org (Postfix) with ESMTP id 62485E5C5B for ; Sat, 19 Oct 2013 03:40:50 -0700 (PDT) Received: by mail-ea0-f181.google.com with SMTP id d10so2573775eaj.12 for ; Sat, 19 Oct 2013 03:40:48 -0700 (PDT) Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Ilija Hadzic Cc: Ilija Hadzic , dri-devel List-Id: dri-devel@lists.freedesktop.org On Thu, Oct 17, 2013 at 09:27:41PM -0400, Ilija Hadzic wrote: > (dropping stable@... until we get the fix we can agree on) > > While looking through that function (drm_crtc_helper_set_config) to > figure out what we really need to save and restore, I came across a > piece of code that you added in 25f397a4. The 'if (connector->dpms != > DRM_MODE_DPMS_ON)' (line 719 in the version that is on the top of > Dave's drm-next branch), comes right after the unconditional break, is > unreachable code (and removing it produces the same object code). Can > you explain what your intent was here? Also, the comment above the > break that reads "don't break so fail path works correct[sic]" doesn't > make much sense to me either. The idea was to also remove the break there. I just haven't had the time yet to fix this fumble and test it a bit. For the funny commment I think this is just to avoid the code in the outer for loop wrestling with the connector->encoder pointer. Removing the comment and inline the ret = -EINVAL; goto fail; would be clearer code imo. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch