Re: [Intel-gfx] [PATCH v2 07/24] drm/i915: Remove useless checks from primary enable/disable
On Mon, Apr 28, 2014 at 03:53:25PM +0300, ville.syrj...@linux.intel.com wrote: From: Ville Syrjälä ville.syrj...@linux.intel.com We won't be calling intel_enable_primary_plane() or intel_disable_primary_plane() with the primary plane in the wrong state. So remove the useless DISPLAY_PLANE_ENABLE checks. Oh, really? That sounds very, very confident. However, haswell_get_pipe_config() disagrees with you. -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v2 07/24] drm/i915: Remove useless checks from primary enable/disable
On Wed, Apr 30, 2014 at 12:28:25PM +0100, Chris Wilson wrote: On Mon, Apr 28, 2014 at 03:53:25PM +0300, ville.syrj...@linux.intel.com wrote: From: Ville Syrjälä ville.syrj...@linux.intel.com We won't be calling intel_enable_primary_plane() or intel_disable_primary_plane() with the primary plane in the wrong state. So remove the useless DISPLAY_PLANE_ENABLE checks. Oh, really? That sounds very, very confident. However, haswell_get_pipe_config() disagrees with you. Are you saying you have a machine where the BIOS enables the pipe but not the plane? Otherwise I don't know what get_pipe_config() has to do with this. -- Ville Syrjälä Intel OTC ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v2 07/24] drm/i915: Remove useless checks from primary enable/disable
On Wed, Apr 30, 2014 at 02:40:10PM +0300, Ville Syrjälä wrote: On Wed, Apr 30, 2014 at 12:28:25PM +0100, Chris Wilson wrote: On Mon, Apr 28, 2014 at 03:53:25PM +0300, ville.syrj...@linux.intel.com wrote: From: Ville Syrjälä ville.syrj...@linux.intel.com We won't be calling intel_enable_primary_plane() or intel_disable_primary_plane() with the primary plane in the wrong state. So remove the useless DISPLAY_PLANE_ENABLE checks. Oh, really? That sounds very, very confident. However, haswell_get_pipe_config() disagrees with you. Are you saying you have a machine where the BIOS enables the pipe but not the plane? Otherwise I don't know what get_pipe_config() has to do with this. Yes. -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v2 07/24] drm/i915: Remove useless checks from primary enable/disable
On Wed, Apr 30, 2014 at 12:43:18PM +0100, Chris Wilson wrote: On Wed, Apr 30, 2014 at 02:40:10PM +0300, Ville Syrjälä wrote: On Wed, Apr 30, 2014 at 12:28:25PM +0100, Chris Wilson wrote: On Mon, Apr 28, 2014 at 03:53:25PM +0300, ville.syrj...@linux.intel.com wrote: From: Ville Syrjälä ville.syrj...@linux.intel.com We won't be calling intel_enable_primary_plane() or intel_disable_primary_plane() with the primary plane in the wrong state. So remove the useless DISPLAY_PLANE_ENABLE checks. Oh, really? That sounds very, very confident. However, haswell_get_pipe_config() disagrees with you. Are you saying you have a machine where the BIOS enables the pipe but not the plane? Otherwise I don't know what get_pipe_config() has to do with this. Yes. I guess we need to shovel the plane related state out of the pipe_config into the mythical plane_config ... One issue atm is that we use the plane bpp to decide what bpp the pipe should be driven at. And the dither settings for it. Especially for dithering I'm a bit unclear whether we can change that while the pipe is enabled or not ... -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v2 07/24] drm/i915: Remove useless checks from primary enable/disable
2014-04-28 9:53 GMT-03:00 ville.syrj...@linux.intel.com: From: Ville Syrjälä ville.syrj...@linux.intel.com We won't be calling intel_enable_primary_plane() or intel_disable_primary_plane() with the primary plane in the wrong state. So remove the useless DISPLAY_PLANE_ENABLE checks. v2: Convert the checks to WARNs instead (Daniel,Paulo) Reviewed-by: Paulo Zanoni paulo.r.zan...@intel.com Signed-off-by: Ville Syrjälä ville.syrj...@linux.intel.com --- drivers/gpu/drm/i915/intel_display.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 7938556..af9e3fe 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -1896,8 +1896,7 @@ static void intel_enable_primary_plane(struct drm_i915_private *dev_priv, reg = DSPCNTR(plane); val = I915_READ(reg); - if (val DISPLAY_PLANE_ENABLE) - return; + WARN_ON(val DISPLAY_PLANE_ENABLE); I915_WRITE(reg, val | DISPLAY_PLANE_ENABLE); intel_flush_primary_plane(dev_priv, plane); @@ -1926,8 +1925,7 @@ static void intel_disable_primary_plane(struct drm_i915_private *dev_priv, reg = DSPCNTR(plane); val = I915_READ(reg); - if ((val DISPLAY_PLANE_ENABLE) == 0) - return; + WARN_ON((val DISPLAY_PLANE_ENABLE) == 0); I915_WRITE(reg, val ~DISPLAY_PLANE_ENABLE); intel_flush_primary_plane(dev_priv, plane); -- 1.8.3.2 -- Paulo Zanoni ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx