From patchwork Thu Oct 1 08:19:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 7306081 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E2608BEEA4 for ; Thu, 1 Oct 2015 08:15:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CCD3720383 for ; Thu, 1 Oct 2015 08:15:49 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 0276220515 for ; Thu, 1 Oct 2015 08:15:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 314326ECE7; Thu, 1 Oct 2015 01:15:47 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTP id 640C96ECE7 for ; Thu, 1 Oct 2015 01:15:46 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP; 01 Oct 2015 01:15:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,616,1437462000"; d="scan'208";a="816922258" Received: from jnikula-mobl.fi.intel.com (HELO localhost) ([10.237.72.67]) by fmsmga002.fm.intel.com with ESMTP; 01 Oct 2015 01:15:43 -0700 From: Jani Nikula To: Daniel Vetter , DRI Development Subject: Re: [PATCH] drm: Hack around CONFIG_AGP=m build failures In-Reply-To: <1443682119-17011-1-git-send-email-daniel.vetter@ffwll.ch> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <1443682119-17011-1-git-send-email-daniel.vetter@ffwll.ch> User-Agent: Notmuch/0.20.2+101~gb57168b (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) Date: Thu, 01 Oct 2015 11:19:05 +0300 Message-ID: <8737xvc87a.fsf@intel.com> MIME-Version: 1.0 Cc: Daniel Vetter , Stephen Rothwell , Michal Marek , Daniel Vetter , linux-kbuild@vger.kernel.org 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 On Thu, 01 Oct 2015, Daniel Vetter wrote: > Surprisingly kbuild can't cope with tristates in the > -$(CONFIG_FOO) pattern. This patch hacks up a solution. Given that it's two distinct Makefile variables (foo-y and foo-m) being assigned to, I don't really find this surprising. Maybe this could be made to work as a convenience, but there might be other, more surpising consequences. > Reported-by: Stephen Rothwell > Reported-by: Ville Syrjälä > Cc: Stephen Rothwell > Cc: Ville Syrjälä > Cc: Michal Marek > Cc: linux-kbuild@vger.kernel.org > Signed-off-by: Daniel Vetter > --- > drivers/gpu/drm/Makefile | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile > index f458d6e33655..e814517513ce 100644 > --- a/drivers/gpu/drm/Makefile > +++ b/drivers/gpu/drm/Makefile > @@ -21,6 +21,8 @@ drm-$(CONFIG_DRM_PANEL) += drm_panel.o > drm-$(CONFIG_OF) += drm_of.o > drm-$(CONFIG_AGP) += drm_agpsupport.o > > +drm-y += $(drm-m) I know what you're doing here, but somehow this looks wrong to me. A bit of git grep also doesn't find convincing arguments to back this up. I'd solve this with a bit of fairly straightforward indirection in the Kconfig to keep the Makefile itself neat. I think it also better documents the intention here. Patch follows. BR, Jani. From efbc9fb6f6284e81a4b9e7599b3233b656cec452 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Thu, 1 Oct 2015 10:53:22 +0300 Subject: [PATCH] drm: fix CONFIG_AGP=m build failures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Cc: Jani Nikula If CONFIG_AGP is enabled as a module, drm_agpsupport.o is not linked into drm, causing: ERROR: "drm_agp_unbind_ioctl" [drivers/gpu/drm/drm.ko] undefined! ERROR: "drm_agp_init" [drivers/gpu/drm/drm.ko] undefined! ERROR: "drm_agp_alloc_ioctl" [drivers/gpu/drm/drm.ko] undefined! ERROR: "drm_agp_clear" [drivers/gpu/drm/drm.ko] undefined! ERROR: "drm_agp_info_ioctl" [drivers/gpu/drm/drm.ko] undefined! ERROR: "drm_agp_enable_ioctl" [drivers/gpu/drm/drm.ko] undefined! ERROR: "drm_agp_release_ioctl" [drivers/gpu/drm/drm.ko] undefined! ERROR: "drm_agp_bind_ioctl" [drivers/gpu/drm/drm.ko] undefined! ERROR: "drm_agp_acquire_ioctl" [drivers/gpu/drm/drm.ko] undefined! ERROR: "drm_agp_free_ioctl" [drivers/gpu/drm/drm.ko] undefined! Regression from commit a7fb8a23c1afa607ec8ce9f61df645f37c529434 Author: Daniel Vetter Date: Wed Sep 9 16:45:52 2015 +0200 drm: Remove __OS_HAS_AGP Add an intermediate bool CONFIG_DRM_AGP, selected if CONFIG_AGP is enabled either as module or built-in. Reported-by: Stephen Rothwell Reported-by: Ville Syrjälä Cc: Stephen Rothwell Cc: Ville Syrjälä Cc: Michal Marek Cc: linux-kbuild@vger.kernel.org Cc: Daniel Vetter Signed-off-by: Jani Nikula --- drivers/gpu/drm/Kconfig | 4 ++++ drivers/gpu/drm/Makefile | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 1a0a8df2eed8..aecbec030aa4 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -7,6 +7,7 @@ menuconfig DRM tristate "Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)" depends on (AGP || AGP=n) && !EMULATED_CMPXCHG && MMU && HAS_DMA + select DRM_AGP if AGP select HDMI select FB_CMDLINE select I2C @@ -21,6 +22,9 @@ menuconfig DRM details. You should also select and configure AGP (/dev/agpgart) support if it is available for your platform. +config DRM_AGP + bool + config DRM_MIPI_DSI bool depends on DRM diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index f458d6e33655..c04d5a33fcac 100644 --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile @@ -19,7 +19,7 @@ drm-$(CONFIG_DRM_GEM_CMA_HELPER) += drm_gem_cma_helper.o drm-$(CONFIG_PCI) += ati_pcigart.o drm-$(CONFIG_DRM_PANEL) += drm_panel.o drm-$(CONFIG_OF) += drm_of.o -drm-$(CONFIG_AGP) += drm_agpsupport.o +drm-$(CONFIG_DRM_AGP) += drm_agpsupport.o drm_kms_helper-y := drm_crtc_helper.o drm_dp_helper.o drm_probe_helper.o \ drm_plane_helper.o drm_dp_mst_topology.o drm_atomic_helper.o