Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp302998pxf; Thu, 8 Apr 2021 03:31:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFtcZoJo5Y4wgT8IL+al5J7NeU+uq//p5J6XwbM9Ydn3JvV+t1FSGBgZk0wkU+LdRBIOZH X-Received: by 2002:aa7:c98f:: with SMTP id c15mr10494691edt.231.1617877906615; Thu, 08 Apr 2021 03:31:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617877906; cv=none; d=google.com; s=arc-20160816; b=y3OcVx3Nu5hxipAqNObbSa3O9ZrJ8GFb+E5CQ5f3iJ0Io0RX9txX1Go4inOIWX2Vpi sFaNe2OlFjtoIy/NWLKedhDuvJf3tTbLd9FboNa6AiSXJiWzAxf/pFJzZItPFYiSBuCa Xr1oK/PmcKLAXsSSnUIwXzZ8r9A8Kp7ABQiMKbtARJ2ucq3Tg2YmQGEKZy7OEsCcaxWB Co9usOohG8E/XWDqJIlBj/bqrBcb4ynoYtzMNurZAVUzXHTmtQawTPDHiQU3oIjSem/u C28PEcPfH1iQP/6zWdxR60tuA0a06TSla/CYzyrAXlA+/f1udRZyv2IzrxoGyoQRZFkY pdpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature; bh=5SgLDhmec/hRbace8E5HPCEtL8OCI8oMc6uREL2v7zo=; b=gcASP+KkfO627JNSRcanjczIlIQ6r9jlUjETYikuoPnrnSUpe47c5phzTDAbjn/ZYt jSyPyA81VbXUHHc9Mj+d3zW7gqeOVjHNt7DD8uwvfnVOh4VlA9mrcNxtwqTN8bISPZ80 CK0RgyEvip+AsiEgLfw0SgtJVI67qhv1EZEMpZ95AlItDO55J3zCDiwegfzs2eztkBYV 4VHLodFIRX7auGSvSTwg2ZcBxam0+L4LsYO6uIl9C66LdotPuqPSVO9yqssacL4uax6G kATuPQQ9oaB2iOCpVgp3F081BzmxIShAbntet9pWVFe0R7W27+lCDvkGEwc/q9sT01a7 smLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=c8rB41SY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id kx24si15318702ejc.689.2021.04.08.03.31.23; Thu, 08 Apr 2021 03:31:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=c8rB41SY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230412AbhDHK1b (ORCPT + 99 others); Thu, 8 Apr 2021 06:27:31 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:33112 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231129AbhDHK12 (ORCPT ); Thu, 8 Apr 2021 06:27:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617877636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5SgLDhmec/hRbace8E5HPCEtL8OCI8oMc6uREL2v7zo=; b=c8rB41SYwy/M7ocN/3M84MyjkkB4U8GB1QVjJqhCYzzWbvYmXxcJB/i5rtaOJALZUJZDrN G399rckpqP/du74HqMiD6QkNEUqGtrO1ALShQhj8nf1HgskQXzQjMm/SeViALrDfBfKDUg H/pNYESaUC9DyFCT6wRa1QsEbg9gW78= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-501-cXUDpcIhOCqLL1mrwS6w2A-1; Thu, 08 Apr 2021 06:27:12 -0400 X-MC-Unique: cXUDpcIhOCqLL1mrwS6w2A-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4E75410053E6; Thu, 8 Apr 2021 10:27:08 +0000 (UTC) Received: from [10.36.114.231] (ovpn-114-231.ams2.redhat.com [10.36.114.231]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4337060C0F; Thu, 8 Apr 2021 10:27:03 +0000 (UTC) Subject: Re: [PATCH v1 2/2] drivers/gpu/drm: don't select DMA_CMA or CMA from aspeed or etnaviv To: Arnd Bergmann Cc: Linux Kernel Mailing List , Linux-MM , Joel Stanley , David Airlie , Daniel Vetter , Andrew Jeffery , Lucas Stach , Russell King , Christian Gmeiner , Mike Rapoport , Bartlomiej Zolnierkiewicz , Linus Walleij , Michal Simek , Masahiro Yamada , Randy Dunlap , Peter Collingbourne , linux-aspeed , dri-devel , Linux ARM , The etnaviv authors , Linux Fbdev development list References: <20210408092011.52763-1-david@redhat.com> <20210408092011.52763-3-david@redhat.com> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: Date: Thu, 8 Apr 2021 12:27:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08.04.21 12:20, Arnd Bergmann wrote: > On Thu, Apr 8, 2021 at 11:22 AM David Hildenbrand wrote: >> >> Random drivers should not override a user configuration of core knobs >> (e.g., CONFIG_DMA_CMA=n). Use "imply" instead, to still respect >> dependencies and manual overrides. >> >> "This is similar to "select" as it enforces a lower limit on another >> symbol except that the "implied" symbol's value may still be set to n >> from a direct dependency or with a visible prompt." >> >> Implying DRM_CMA should be sufficient, as that depends on CMA. >> >> Note: If this is a real dependency, we should use "depends on DMA_CMA" >> instead - but I assume the driver can work without CMA just fine -- >> esp. when we wouldn't have HAVE_DMA_CONTIGUOUS right now. > > 'imply' is almost never the right solution, and it tends to cause more > problems than it solves. I thought that was the case with "select" :) > > In particular, it does not prevent a configuration with 'DRM_CMA=m' I assume you meant "DRM_CMA=n" ? DRM_CMA cannot be built as a module. > and 'DRMA_ASPEED_GFX=y', or any build failures from such > a configuration. I don't follow. "DRM_CMA=n" and 'DRMA_ASPEED_GFX=y' is supposed to work just fine (e.g., without HAVE_DMA_CONTIGUOUS) or what am I missing? > > If you want this kind of soft dependency, you need > 'depends on DRM_CMA || !DRM_CMA'. Seriously? I think the point of imply is "please enable if possible and not prevented by someone else". Your example looks more like a NOP - no? Or will it have the same effect? -- Thanks, David / dhildenb