From patchwork Wed Aug 26 00:55:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Rothwell X-Patchwork-Id: 11737029 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DE6A7739 for ; Wed, 26 Aug 2020 00:55:56 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B099420737 for ; Wed, 26 Aug 2020 00:55:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=canb.auug.org.au header.i=@canb.auug.org.au header.b="bpsFMPJ6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B099420737 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=canb.auug.org.au Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 127D16E055; Wed, 26 Aug 2020 00:55:52 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0AFC06E055; Wed, 26 Aug 2020 00:55:50 +0000 (UTC) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4BbnTw0RvFz9sTK; Wed, 26 Aug 2020 10:55:48 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=canb.auug.org.au; s=201702; t=1598403348; bh=hoxKBsKE63D/fgihlpKl/FhX6INVTwC8nzDYLZcAU1Y=; h=Date:From:To:Cc:Subject:From; b=bpsFMPJ60MQtLACGbpOyZQnUtvSXtarJc1iumaQkKoENqgipOYxREylVeY6K+lCbN 8bsaQ9ObuYAg511+ZVaVp+fsvejqUzNEXUvbfmK8iFXIh385ZKymYdzcq2IjiQkURG mv/LIEmqcvTL11ciwwJwY5DWOCRvqXlQVA1eSb8tprUOQYhApvm22W9ad5Shg9DKgu SqDa3RYgRVeVZGxWBxvHPwo/KrsYtDBEk52eOcAYhXBVvrFv3yOYRCchK/efMD6M9D 2d+Nujeg0+iqwzMFCArfDYH0VKoSRyc39FZWZgveJNW1WaX+BvhFpRiMhZJrtbZ1zg Jcrsd9bdIsyAw== Date: Wed, 26 Aug 2020 10:55:47 +1000 From: Stephen Rothwell To: Daniel Vetter , Intel Graphics , DRI Subject: linux-next: build failure after merge of the drm-misc tree Message-ID: <20200826105547.4f6ea26d@canb.auug.org.au> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alex Deucher , Sidong Yang , Linux Next Mailing List , Linux Kernel Mailing List , Gerd Hoffmann Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi all, After merging the drm-misc tree, today's linux-next build (x86_64 allmodconfig) failed like this: drivers/gpu/drm/qxl/qxl_display.c: In function 'qxl_display_read_client_monitors_config': include/drm/drm_modeset_lock.h:167:7: error: implicit declaration of function 'drm_drv_uses_atomic_modeset' [-Werror=implicit-function-declaration] 167 | if (!drm_drv_uses_atomic_modeset(dev)) \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/qxl/qxl_display.c:187:2: note: in expansion of macro 'DRM_MODESET_LOCK_ALL_BEGIN' 187 | DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, DRM_MODESET_ACQUIRE_INTERRUPTIBLE, ret); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/qxl/qxl_display.c:189:35: error: macro "DRM_MODESET_LOCK_ALL_END" requires 3 arguments, but only 2 given 189 | DRM_MODESET_LOCK_ALL_END(ctx, ret); | ^ In file included from include/drm/drm_crtc.h:36, from include/drm/drm_atomic.h:31, from drivers/gpu/drm/qxl/qxl_display.c:29: include/drm/drm_modeset_lock.h:194: note: macro "DRM_MODESET_LOCK_ALL_END" defined here 194 | #define DRM_MODESET_LOCK_ALL_END(dev, ctx, ret) \ | drivers/gpu/drm/qxl/qxl_display.c:189:2: error: 'DRM_MODESET_LOCK_ALL_END' undeclared (first use in this function) 189 | DRM_MODESET_LOCK_ALL_END(ctx, ret); | ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/qxl/qxl_display.c:189:2: note: each undeclared identifier is reported only once for each function it appears in drivers/gpu/drm/qxl/qxl_display.c:187:2: error: label 'modeset_lock_fail' used but not defined 187 | DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, DRM_MODESET_ACQUIRE_INTERRUPTIBLE, ret); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from include/drm/drm_crtc.h:36, from include/drm/drm_atomic.h:31, from drivers/gpu/drm/qxl/qxl_display.c:29: include/drm/drm_modeset_lock.h:170:1: warning: label 'modeset_lock_retry' defined but not used [-Wunused-label] 170 | modeset_lock_retry: \ | ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/qxl/qxl_display.c:187:2: note: in expansion of macro 'DRM_MODESET_LOCK_ALL_BEGIN' 187 | DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, DRM_MODESET_ACQUIRE_INTERRUPTIBLE, ret); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/qxl/qxl_display.c: In function 'qxl_framebuffer_surface_dirty': drivers/gpu/drm/qxl/qxl_display.c:434:35: error: macro "DRM_MODESET_LOCK_ALL_END" requires 3 arguments, but only 2 given 434 | DRM_MODESET_LOCK_ALL_END(ctx, ret); | ^ In file included from include/drm/drm_crtc.h:36, from include/drm/drm_atomic.h:31, from drivers/gpu/drm/qxl/qxl_display.c:29: include/drm/drm_modeset_lock.h:194: note: macro "DRM_MODESET_LOCK_ALL_END" defined here 194 | #define DRM_MODESET_LOCK_ALL_END(dev, ctx, ret) \ | drivers/gpu/drm/qxl/qxl_display.c:434:2: error: 'DRM_MODESET_LOCK_ALL_END' undeclared (first use in this function) 434 | DRM_MODESET_LOCK_ALL_END(ctx, ret); | ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/qxl/qxl_display.c:411:2: error: label 'modeset_lock_fail' used but not defined 411 | DRM_MODESET_LOCK_ALL_BEGIN(fb->dev, ctx, DRM_MODESET_ACQUIRE_INTERRUPTIBLE, ret); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from include/drm/drm_crtc.h:36, from include/drm/drm_atomic.h:31, from drivers/gpu/drm/qxl/qxl_display.c:29: include/drm/drm_modeset_lock.h:170:1: warning: label 'modeset_lock_retry' defined but not used [-Wunused-label] 170 | modeset_lock_retry: \ | ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/qxl/qxl_display.c:411:2: note: in expansion of macro 'DRM_MODESET_LOCK_ALL_BEGIN' 411 | DRM_MODESET_LOCK_ALL_BEGIN(fb->dev, ctx, DRM_MODESET_ACQUIRE_INTERRUPTIBLE, ret); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ Caused by commit bbaac1354cc9 ("drm/qxl: Replace deprecated function in qxl_display") interacting with commit 77ef38574beb ("drm/modeset-lock: Take the modeset BKL for legacy drivers") from the drm-misc-fixes tree. drivers/gpu/drm/qxl/qxl_display.c manages to include drm/drm_modeset_lock.h by some indirect route, but fails to have drm/drm_drv.h similarly included. In fact, drm/drm_modeset_lock.h should have included drm/drm_drv.h since it uses things declared there, and drivers/gpu/drm/qxl/qxl_display.c should include drm/drm_modeset_lock.h similarly. I have added the following hack patch for today. From: Stephen Rothwell Date: Wed, 26 Aug 2020 10:40:18 +1000 Subject: [PATCH] fix interaction with drm-misc-fix commit Signed-off-by: Stephen Rothwell --- drivers/gpu/drm/qxl/qxl_display.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index fa79688013b7..6063f3a15329 100644 --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c @@ -26,6 +26,7 @@ #include #include +#include #include #include #include @@ -186,7 +187,7 @@ void qxl_display_read_client_monitors_config(struct qxl_device *qdev) DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, DRM_MODESET_ACQUIRE_INTERRUPTIBLE, ret); qxl_update_offset_props(qdev); - DRM_MODESET_LOCK_ALL_END(ctx, ret); + DRM_MODESET_LOCK_ALL_END(dev, ctx, ret); if (!drm_helper_hpd_irq_event(dev)) { /* notify that the monitor configuration changed, to adjust at the arbitrary resolution */ @@ -431,7 +432,7 @@ static int qxl_framebuffer_surface_dirty(struct drm_framebuffer *fb, clips, num_clips, inc, 0); out_lock_end: - DRM_MODESET_LOCK_ALL_END(ctx, ret); + DRM_MODESET_LOCK_ALL_END(fb->dev, ctx, ret); return 0; }