Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753333AbbEDNQE (ORCPT ); Mon, 4 May 2015 09:16:04 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:58303 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753190AbbEDNPS (ORCPT ); Mon, 4 May 2015 09:15:18 -0400 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 X-AuditID: cbfec7f4-f79c56d0000012ee-f9-554770e3d54b Content-transfer-encoding: 8BIT Message-id: <554770E1.2000401@samsung.com> Date: Mon, 04 May 2015 15:15:13 +0200 From: Andrzej Hajda User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 Newsgroups: gmane.linux.kernel.samsung-soc,gmane.linux.kernel,gmane.comp.video.dri.devel,gmane.linux.ports.arm.kernel To: Krzysztof Kozlowski , Daniel Stone Cc: Inki Dae , linux-samsung-soc , Seung-Woo Kim , Linux Kernel Mailing List , dri-devel , Kyungmin Park , Kukjin Kim , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH] drm/exynos: Fix build breakage on !DRM_EXYNOS_FIMD References: <1430539706-2945-1-git-send-email-k.kozlowski.k@gmail.com> <55472339.8040408@samsung.com> <5547696D.8000300@gmail.com> In-reply-to: <5547696D.8000300@gmail.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrFLMWRmVeSWpSXmKPExsVy+t/xK7qPC9xDDf5N17C40jqd1eLK1/ds FpPuT2CxeP7vB7tF/+PXzBZnm96wW2x6fI3V4vKuOWwWM87vY7KYMfklmwOXx4uv25g9ds66 y+6xaVUnm8f97uNMHpuX1Hv0bVnF6PF5k1wAexSXTUpqTmZZapG+XQJXRvsFq4IX4hUzNhs0 MH4W6mLk5JAQMJE4++QCE4QtJnHh3nq2LkYuDiGBpYwSN1fOZQZJ8AoISvyYfI+li5GDg1lA XuLIpWwIU11iypRciPLnjBJf571kgSjXkmg+0QlmswioSnSe+w02hk1AU+Lv5ptsIL2iAhES 3ScqQcJ8AuUSO65vACsRAQp/XvCaDcRmFuhjluh9HANiCwu4S9y/coMFYtdZRoktTw+xgiQ4 gWY2L+hgncAoOAvJpbMQLp2FcOkCRuZVjKKppckFxUnpuYZ6xYm5xaV56XrJ+bmbGCEx8mUH 4+JjVocYBTgYlXh4F8i6hwqxJpYVV+YeYpTgYFYS4Q2PAArxpiRWVqUW5ccXleakFh9ilOZg URLnnbvrfYiQQHpiSWp2ampBahFMlomDU6qBcZVY/cr0+lqRndyiKt9EYudLaty+XPUusPDH xOZMK8MfC92TPVe7RW+dcELC/3vJ+S6Rs6ucuM9qvvN677gv4FL73W3f97pwZ71qFnx1X2mq POO+ree5hXhuP+0WSf2aF7ZlT8Jm5rm/JvysW/8lsP0m63KGM1ybX5rOdZqyMeWi171fxp6V 8UosxRmJhlrMRcWJAI++KSiNAgAA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3207 Lines: 91 Hi, On 05/04/2015 02:43 PM, Krzysztof Kozlowski wrote: > 2015-05-04 20:34 GMT+09:00 Daniel Stone : >> Hi, >> >> On 4 May 2015 at 08:43, Inki Dae wrote: >>> On 2015년 05월 02일 13:08, Krzysztof Kozlowski wrote: >>>> Selecting CONFIG_FB_S3C disables CONFIG_DRM_EXYNOS_FIMD leading to build >>>> error: >>> >>> No, eDP has no any dependency of FIMD but DECON. Just add dependency >>> code like below, >>> >>> config DRM_EXYNOS7_DECON >>> bool "Exynos DRM DECON" >>> - depends on DRM_EXYNOS >>> + depends on DRM_EXYNOS && !FB_S3C > > Actually my commit message was not detailed enough. The FB_S3C here > won't solve the issue because you may: > 1, disable FIMD and FB_S3C, > 2, enabke DECON and DP, > and it won't compile. > > Currently the FIMD must be enabled if DRM_EXYNOS_DP is enabled. > >> >> But it does clearly and explicitly call fimd_dp_clock_enable from >> exynos_dp_powero{n,ff}. So the dependency you're proposing seems >> backwards: it's not an expression of the requirements of the current >> code (that FIMD DP code be available, i.e. CONFIG_DRM_EXYNOS_FIMD is >> selected), but an indirect expression of another dependency >> (CONFIG_FB_S3C disables CONFIG_DRM_EXYNOS_FIMD, so disable >> CONFIG_FB_S3C). >> >> Additionally, as the call comes from exynos_dp_core.c, which is built >> by CONFIG_DRM_EXYNOS_DP (an explicitly user-selectable option), why >> shouldn't the dependency be there? Ah, because the dependency on DP is >> for (DECON || FIMD), but as DECON doesn't provide >> fimd_dp_clock_enable(), it doesn't seem like it would compile if you >> selected DECON and not FIMD. >> >> So, for me, the cleanest solution would be config DRM_EXYNOS_DP gains >> a hard dependency on DRM_EXYNOS_FIMD, at least until it can be fixed >> to compile without FIMD. > > Right, you correctly pointed current dependencies. Still it looks little > hacky because EXYNOS_DP may work with FIMD or DECON. Are you sure? I have not seen any chipset having DECON and DP. In all chipsets known to me DP is always accompanied by FIMD. I guess it can change in the future, but for now hard dependency on FIMD seems to be OK - it just reflects hardware design. Of course this is just my humble opinion :) Regards Andrzej It does not really > need FIMD. Using ifdefs in headers is not uncommon - many core > subsystems do this that way to provide stubs. > > Probably the cleanest way would be to provide by FIMD and DECON a common > interface for DP for such operation, something like: > struct exynos_drm_crtc { > struct drm_crtc base; > ... > void (*clock_enable)(struct exynos_drm_crtc *crtc, bool enable) > ); > > which, if non-NULL, will be called by exynos_dp_core.c: > static void exynos_dp_poweron(struct exynos_dp_device *dp) > { > ... > if (crtc->clock_enable) > crtc->clock_enable(crtc, true); > } > > What do you think? > > Best regards, > Krzysztof > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/