[Intel-gfx] [PATCH 1/3] drm/i915: hw state readout&check support for cpu_transcoder
Daniel Vetter
daniel at ffwll.ch
Tue May 28 11:41:13 CEST 2013
On Mon, May 27, 2013 at 05:45:53PM -0300, Paulo Zanoni wrote:
> 2013/5/21 Daniel Vetter <daniel.vetter at ffwll.ch>:
> > + 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 <paulo.r.zanoni at intel.com>
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
More information about the Intel-gfx
mailing list