From: Laurent Pinchart Subject: [PATCH 2/2] drm: Perform a full mode set when the pixel format changed Date: Thu, 31 May 2012 18:26:16 +0200 Message-ID: <1338481576-29751-3-git-send-email-laurent.pinchart@ideasonboard.com> References: <1338481576-29751-1-git-send-email-laurent.pinchart@ideasonboard.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [95.142.166.194]) by gabe.freedesktop.org (Postfix) with ESMTP id E03589E747 for ; Thu, 31 May 2012 09:26:20 -0700 (PDT) Received: from localhost.localdomain (unknown [91.178.146.253]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 80F5E7D14 for ; Thu, 31 May 2012 18:26:18 +0200 (CEST) In-Reply-To: <1338481576-29751-1-git-send-email-laurent.pinchart@ideasonboard.com> 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: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org Test whether the pixel format changes in the mode set handler, and perform a full mode set instead of a mode set base if it does. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/drm_crtc_helper.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index 3252e70..0e8cd89 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c @@ -609,6 +609,9 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set) } else if (set->fb->bits_per_pixel != set->crtc->fb->bits_per_pixel) { mode_changed = true; + } else if (set->fb->pixel_format != + set->crtc->fb->pixel_format) { + mode_changed = true; } else fb_changed = true; } -- 1.7.3.4