diff mbox

[40/58] drm/i915: don't update the fb base if there is no fb

Message ID 1345403595-9678-41-git-send-email-daniel.vetter@ffwll.ch (mailing list archive)
State Accepted
Headers show

Commit Message

Daniel Vetter Aug. 19, 2012, 7:12 p.m. UTC
Otherwise we'll set_fb complains pretty loudly if we the crtc is off
and userspace moves the NULL fb around a bit. Yeah, this actually
happens in the wild ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jesse Barnes Sept. 5, 2012, 4:47 p.m. UTC | #1
On Sun, 19 Aug 2012 21:12:57 +0200
Daniel Vetter <daniel.vetter@ffwll.ch> wrote:

> Otherwise we'll set_fb complains pretty loudly if we the crtc is off
> and userspace moves the NULL fb around a bit. Yeah, this actually
> happens in the wild ...
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 4b2b17f..125443a 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -6827,7 +6827,7 @@ intel_set_config_compute_mode_changes(struct drm_mode_set *set,
>  			config->fb_changed = true;
>  	}
>  
> -	if (set->x != set->crtc->x || set->y != set->crtc->y)
> +	if (set->fb && (set->x != set->crtc->x || set->y != set->crtc->y))
>  		config->fb_changed = true;
>  
>  	if (set->mode && !drm_mode_equal(set->mode, &set->crtc->mode)) {

Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 4b2b17f..125443a 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -6827,7 +6827,7 @@  intel_set_config_compute_mode_changes(struct drm_mode_set *set,
 			config->fb_changed = true;
 	}
 
-	if (set->x != set->crtc->x || set->y != set->crtc->y)
+	if (set->fb && (set->x != set->crtc->x || set->y != set->crtc->y))
 		config->fb_changed = true;
 
 	if (set->mode && !drm_mode_equal(set->mode, &set->crtc->mode)) {