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: 7306091 Return-Path: X-Original-To: patchwork-linux-kbuild@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 C00A39F302 for ; Thu, 1 Oct 2015 08:15:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AD8C820383 for ; Thu, 1 Oct 2015 08:15:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7CAF52038E for ; Thu, 1 Oct 2015 08:15:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751232AbbJAIPu (ORCPT ); Thu, 1 Oct 2015 04:15:50 -0400 Received: from mga11.intel.com ([192.55.52.93]:49619 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752115AbbJAIPq convert rfc822-to-8bit (ORCPT ); Thu, 1 Oct 2015 04:15:46 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.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 Cc: Stephen Rothwell , linux-kbuild@vger.kernel.org, Daniel Vetter , Michal Marek , Daniel Vetter 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 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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