From patchwork Wed Sep 30 18:47:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 7301581 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D1ECE9F32B for ; Wed, 30 Sep 2015 18:47:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2B8EA20676 for ; Wed, 30 Sep 2015 18:47:49 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 07DF620623 for ; Wed, 30 Sep 2015 18:47:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2DEA86E3AE; Wed, 30 Sep 2015 11:47:46 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qk0-f172.google.com (mail-qk0-f172.google.com [209.85.220.172]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0B60F6E3AE for ; Wed, 30 Sep 2015 11:47:45 -0700 (PDT) Received: by qkcf65 with SMTP id f65so21911864qkc.3 for ; Wed, 30 Sep 2015 11:47:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=ndbJgUttjXfw8de/O9CQM+OruLEnzqn8GVCUhCgf/lU=; b=WrtE2qFcWWp445byokkqLfjixerMie8PrTNg82Yo2WbMiwZcqcJV+aDbbjNeME9ajn B4hmO0mkcNo1g7UaBQYk80aInQ9PrzAYq6mIG9CAewBgM7x4wIkQLGEMrtihMvESzK/t sD60iRdyOS6HzcM6zJ6Cutq66VBi1Mqpm3InCBmDw2sTZOk9Tda3+t3Ows9yF/fLmpQk lCIQRzsfKtbTds7yaFFU0mujiBrNKA/I051JIDVhjD2/+8afF+sES2FZ4EGO355V4KtY VAeZanRqE7rKX+x/P22BrsHPlOIlVn9cuF3xFO3mCedWJQ6yYJ93Eher5qGKppEXLqLV oVcw== X-Received: by 10.55.195.86 with SMTP id a83mr6449820qkj.72.1443638864217; Wed, 30 Sep 2015 11:47:44 -0700 (PDT) Received: from localhost.localdomain (static-74-96-105-49.washdc.fios.verizon.net. [74.96.105.49]) by smtp.gmail.com with ESMTPSA id t69sm784261qki.11.2015.09.30.11.47.43 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Sep 2015 11:47:43 -0700 (PDT) From: Alex Deucher X-Google-Original-From: Alex Deucher To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/2] drm: handle cursor_set2 in restore_fbdev_mode Date: Wed, 30 Sep 2015 14:47:37 -0400 Message-Id: <1443638858-16895-1-git-send-email-alexander.deucher@amd.com> X-Mailer: git-send-email 1.8.3.1 Cc: Alex Deucher X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If a driver uses the cursor_set2 crtc callback rather than cursor_set, use that. This fixes the fbdev helper for drivers that use cursor_set2. Change-Id: I127d3f8e72789ba70c3648140f87c6187864e130 Signed-off-by: Alex Deucher Reviewed-by: Michel Dänzer --- drivers/gpu/drm/drm_fb_helper.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 418d299..ca08c47 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -345,7 +345,11 @@ static bool restore_fbdev_mode(struct drm_fb_helper *fb_helper) struct drm_crtc *crtc = mode_set->crtc; int ret; - if (crtc->funcs->cursor_set) { + if (crtc->funcs->cursor_set2) { + ret = crtc->funcs->cursor_set2(crtc, NULL, 0, 0, 0, 0, 0); + if (ret) + error = true; + } else if (crtc->funcs->cursor_set) { ret = crtc->funcs->cursor_set(crtc, NULL, 0, 0, 0); if (ret) error = true;