From patchwork Mon Dec 10 10:03:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 10720989 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 09A766C5 for ; Mon, 10 Dec 2018 10:04:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EC55629C24 for ; Mon, 10 Dec 2018 10:04:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E0A3C29D4F; Mon, 10 Dec 2018 10:04:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9F83729C24 for ; Mon, 10 Dec 2018 10:04:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 72A886E3A0; Mon, 10 Dec 2018 10:04:14 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8662A6E39A for ; Mon, 10 Dec 2018 10:04:08 +0000 (UTC) Received: by mail-ed1-x542.google.com with SMTP id f23so8949661edb.3 for ; Mon, 10 Dec 2018 02:04:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UyEl2XnejSAGj+V8G3JRmn7+GiXupA9GboovLPcGHHA=; b=PM50y+EMotgvKnrfUH69iM4qmmPmI3X+IgRheaQ1jozSlWO2HHkftvIDl6pNi4OOKB gFoXHcBvq1AgPYUPUL5c7iojXs6JI3JjrYgT+2qwqukJDdW48MZrlyEWxpHl607WAm07 VGBMfXUHsmHOihT0FQS+dv4giw3/P2iINYGtno+tvyQQYW6JE3+xYsBc2UxZqbGIzIkD 05eImYyAXrFNAR2JfPsjmoZvi7t7cbM2bMzmlen1epfyR8DCTlqSeG/28hL+3Yi6JHpb zez9TaTqRYkuNEX+47vsxxbXIsfKaSpdzmr/40JLgGBq6IGaN58HQAt6Tq3KJsTKKBAW 4o7A== X-Gm-Message-State: AA+aEWYStyCbD9DS3MdM+8lZKcmAd33JNzlJMJ+zYi3eq5cpIpMnH18K yZvyRFXA1E+njGMC2RQBO+yi6L7gtZo= X-Google-Smtp-Source: AFSGD/VsN6VvgYtplG9nfidNQtSnkUFeE3ryXRfboxCqUOLCZiG2a6T/bg1XUCd+QtUP34vOlEIkkQ== X-Received: by 2002:a17:906:48c5:: with SMTP id d5-v6mr9214161ejt.85.1544436247128; Mon, 10 Dec 2018 02:04:07 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:569e:0:3106:d637:d723:e855]) by smtp.gmail.com with ESMTPSA id c11-v6sm1720942ejz.70.2018.12.10.02.04.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Dec 2018 02:04:06 -0800 (PST) From: Daniel Vetter To: Intel Graphics Development Subject: [PATCH 2/7] drm/nouveau: Stop using drm_crtc_force_disable Date: Mon, 10 Dec 2018 11:03:54 +0100 Message-Id: <20181210100359.22507-3-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.20.0.rc1 In-Reply-To: <20181210100359.22507-1-daniel.vetter@ffwll.ch> References: <20181210100359.22507-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Vetter , Sean Paul , DRI Development , Daniel Vetter Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The correct way for legacy drivers to update properties that need to do a full modeset, is to do a full modeset. Note that we don't need to call the drm_mode_config_internal helper because we're not changing any of the refcounted paramters. Signed-off-by: Daniel Vetter Cc: Daniel Vetter Cc: Sean Paul --- drivers/gpu/drm/nouveau/dispnv04/tvnv17.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c index 6a4ca139cf5d..3e82db41f8a4 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c +++ b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c @@ -750,7 +750,9 @@ static int nv17_tv_set_property(struct drm_encoder *encoder, /* Disable the crtc to ensure a full modeset is * performed whenever it's turned on again. */ if (crtc) - drm_crtc_force_disable(crtc); + return drm_crtc_helper_set_mode(crtc, &crtc->mode, + crtc->x, crtc->y, + crtc->primary->fb); } return 0;