From patchwork Mon Sep 3 16:54:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 10586185 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 B15FC139B for ; Mon, 3 Sep 2018 16:56:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A02F028A73 for ; Mon, 3 Sep 2018 16:56:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 94ED328F5D; Mon, 3 Sep 2018 16:56:03 +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=ham 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 5A15E28A73 for ; Mon, 3 Sep 2018 16:56:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 21E8A6E2C2; Mon, 3 Sep 2018 16:55:08 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-ed1-x541.google.com (mail-ed1-x541.google.com [IPv6:2a00:1450:4864:20::541]) by gabe.freedesktop.org (Postfix) with ESMTPS id 811ED6E2B2 for ; Mon, 3 Sep 2018 16:55:05 +0000 (UTC) Received: by mail-ed1-x541.google.com with SMTP id u1-v6so1260459eds.1 for ; Mon, 03 Sep 2018 09:55:05 -0700 (PDT) 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; bh=9sX3JeAneghiB3GYX9jGmonDCrUPY+SST7ZLAa81yTw=; b=f5S3GekQKuy9204ba9tPsNmfYcdPI6w4BWD19rlSnBOlQJ/n/pyRlyNnxwmyoZh90w qX4joFlapXnUMVkUSkpWny7S0CNfrmjHbCmOko5t53+E4qOrS376AhJxaUUDUTQLJ+TD ygw7AqSRMZtBXknjw0VjPkn3g1NVWSadzPdry1ZtibruIM7rrCcHlu+2+BpMcJ3xrAfU Nboa300ybB7GrWBBKpI0VnJMrBvBdBgnSu0N2svJyGCvXrN/N0DUzB2FL/o3RVtRtuCW Sks70tdUXha8ibWJvCsiMmCehahBWABaUlHDBEnoqzB776iDACPavyo6UH6L3SuWgcx3 t7dw== X-Gm-Message-State: APzg51AcdZYTHFavaTaSiSFxCpGESn7SIstalxRZ3XIc8xWPJaeS2r9N 0cOq441utJ3D7wdmcs155XMdXA== X-Google-Smtp-Source: ANB0VdYi2IovaBYZFPMabrfOL/GcE2lZjHlvANAyIYOSH8I3kA5xIBreMeIE7OxCkRgycTv75QwvIA== X-Received: by 2002:a50:8a66:: with SMTP id i93-v6mr31827661edi.281.1535993703911; Mon, 03 Sep 2018 09:55:03 -0700 (PDT) Received: from phenom.ffwll.local (212-51-149-109.fiber7.init7.net. [212.51.149.109]) by smtp.gmail.com with ESMTPSA id u53-v6sm12777790edm.51.2018.09.03.09.55.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Sep 2018 09:55:03 -0700 (PDT) From: Daniel Vetter To: DRI Development Date: Mon, 3 Sep 2018 18:54:37 +0200 Message-Id: <20180903165439.24845-12-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180903165439.24845-1-daniel.vetter@ffwll.ch> References: <20180903165439.24845-1-daniel.vetter@ffwll.ch> Subject: [Intel-gfx] [PATCH 12/14] drm/vmwgfx: Don't look at state->allow_modeset X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Vetter , Intel Graphics Development MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP That's purely for the uapi layer to implement the ALLOW_MODESET flag. Drivers should instead look at the state, e.g. through drm_atomic_crtc_needs_modeset(), which vmwgfx already does. Also remove the confusing comment, since checking allow_modeset is at best a micro optimization. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index 0f7e116a59f0..71b7460d140f 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c @@ -1683,14 +1683,6 @@ vmw_kms_atomic_check_modeset(struct drm_device *dev, if (ret) return ret; - if (!state->allow_modeset) - return ret; - - /* - * Legacy path do not set allow_modeset properly like - * @drm_atomic_helper_update_plane, This will result in unnecessary call - * to vmw_kms_check_topology. So extra set of check. - */ for_each_new_crtc_in_state(state, crtc, crtc_state, i) { if (drm_atomic_crtc_needs_modeset(crtc_state)) need_modeset = true;