From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 1/3] drm/i915: hw state readout&check support for cpu_transcoder Date: Tue, 28 May 2013 11:41:13 +0200 Message-ID: <20130528094113.GY15743@phenom.ffwll.local> References: <1368172975-23540-1-git-send-email-daniel.vetter@ffwll.ch> <1369176624-5918-1-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f47.google.com (mail-ee0-f47.google.com [74.125.83.47]) by gabe.freedesktop.org (Postfix) with ESMTP id 38C93E608A for ; Tue, 28 May 2013 02:41:19 -0700 (PDT) Received: by mail-ee0-f47.google.com with SMTP id t10so4478075eei.6 for ; Tue, 28 May 2013 02:41:18 -0700 (PDT) Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Paulo Zanoni Cc: Daniel Vetter , Intel Graphics Development , Paulo Zanoni List-Id: intel-gfx@lists.freedesktop.org On Mon, May 27, 2013 at 05:45:53PM -0300, Paulo Zanoni wrote: > 2013/5/21 Daniel Vetter : > > + pipe_config->cpu_transcoder = crtc->pipe; > > + tmp = I915_READ(TRANS_DDI_FUNC_CTL(TRANSCODER_EDP)); > > + if (tmp & TRANS_DDI_FUNC_ENABLE) { > > + enum pipe trans_edp_pipe; > > + switch (tmp & TRANS_DDI_EDP_INPUT_MASK) { > > + default: > > + WARN(1, "unknown pipe linked to edp transcoder\n"); > > Since there's no "break" we'll assign PIPE_A and then we'll probably > break pipe A on this case. OTOH this case should never really happen, > so I'm not sure if we care. So this is an optional bikeshedding. Generally I prefer to have as little fallback code as possible for such impossible cases. Avoiding the break makes sure we have at elast a valid pipe value and so hopefully increase our chances that the following code survives. No matter what we're pretty much guaranteed to end up with a black screen. > Reviewed-by: Paulo Zanoni Thanks for the review, first 2 patches are merged to dinq now. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch