Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 530BBC433FE for ; Tue, 16 Nov 2021 10:01:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 318A161AD2 for ; Tue, 16 Nov 2021 10:01:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233708AbhKPKEp (ORCPT ); Tue, 16 Nov 2021 05:04:45 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:20082 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233633AbhKPKEk (ORCPT ); Tue, 16 Nov 2021 05:04:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637056903; 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=533DJPrDDxlMGTv0pnxjgO+BwgxyEzDlbPhO6HwlUb4=; b=IMJbRc71ULBSUHRPlKAJ1ahgAjNowOWQB2GmfGP+vIwUepZsFkxjbpNP7vsa+u23uSzUzw IhsYXBYXk8eMPmSWezzdYvK0kjNCJZ3/DPkgs4g6wLAuBj8OvOEm1W9TwdLqBTFhtcVeUT VzDSNKR+SMFOf7JUZ6ZlejVOT3dh0uo= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-383-1-e0LjunOhWJ838b-FIL6A-1; Tue, 16 Nov 2021 05:01:41 -0500 X-MC-Unique: 1-e0LjunOhWJ838b-FIL6A-1 Received: by mail-wr1-f70.google.com with SMTP id v17-20020adfedd1000000b0017c5e737b02so4344890wro.18 for ; Tue, 16 Nov 2021 02:01:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=533DJPrDDxlMGTv0pnxjgO+BwgxyEzDlbPhO6HwlUb4=; b=Dsr8QIKK0pB+Wg+nL1JRd/yOnv09kDxrFpRQdTA1j/ZWplOYgI/bYI2VHUN1E2cUu0 Ru3OZVURVUGD//lzH5HUvyKxdGmZGHSGNpWIpbbe8pcXOyrZc+X4dlq38+GbtbxBcZNl X0vQPuQzmCV9FpAFXkmNE4Zu2cHA3+kH8UtQP+9rShfVsedT8uRXC2edmW9oh/DaGLp+ 9Z7J0++o3AdEpBq7EerVLZnKcjuTQ3bjWbdygQ81XARjxp0BGSlQNUkmKxWrNVAtMejV 497CW6EZ+Mt3yMNHNPtl2tFULB14Rihu9FMg1tJFAzVqqbNfST+q2KLW0rfF7jrAnXFE /koA== X-Gm-Message-State: AOAM532O75x0arYeczHwQzPfIE6aroSFYNcNSpukDPmc7Vps8KeFqWKw f+PaiQs0sHO38xhxn9y19GX1pMr+hlkHYwBLyegv237qQgGAxQzX3G+sLh/1IWiaYDrug10ise1 lbyHWmsOVRf9NtLLCopbk6aLa X-Received: by 2002:a05:600c:24d:: with SMTP id 13mr6163762wmj.156.1637056900561; Tue, 16 Nov 2021 02:01:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJwlGjWi8alUIqPMmPz5/NWCmPlLiqtCNyw7It2G0hrbpLCRkisY1dNBJt1D//kFA9f//Tcinw== X-Received: by 2002:a05:600c:24d:: with SMTP id 13mr6163736wmj.156.1637056900360; Tue, 16 Nov 2021 02:01:40 -0800 (PST) Received: from [192.168.1.102] (91.pool90-171-47.dynamic.orange.es. [90.171.47.91]) by smtp.gmail.com with ESMTPSA id t11sm16568630wrz.97.2021.11.16.02.01.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Nov 2021 02:01:39 -0800 (PST) Message-ID: <7cbadb2a-b6e9-f264-9d95-b76c7071af27@redhat.com> Date: Tue, 16 Nov 2021 11:01:38 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH v2] fbdev: Prevent probing generic drivers if a FB is already registered Content-Language: en-US To: Geert Uytterhoeven Cc: Linux Kernel Mailing List , Thomas Zimmermann , Sam Ravnborg , Peter Jones , Daniel Vetter , DRI Development , Linux Fbdev development list , Hans de Goede , Ilya Trukhanov , Thorsten Leemhuis , Borislav Petkov , Greg Kroah-Hartman References: <20211111111120.1344613-1-javierm@redhat.com> <579a584a-68af-d5c9-0547-30cb1592d46f@redhat.com> From: Javier Martinez Canillas In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Geert, On 11/16/21 10:43, Geert Uytterhoeven wrote: [snip] >> >> So this is already a fragile solution and $SUBJECT doesn't make things worse >> IMO. Since not having something like this can lead to issues as reported by: >> >> https://lore.kernel.org/all/20211110200253.rfudkt3edbd3nsyj@lahvuun/ >> >> We could probably do some smarter here by providing a function that checks >> if the registered fbdev drivers matches the aperture base. But I'm unsure >> if that's worth it. After all, fbdev drivers are likely to be disabled by >> most distros soon now that we have the simpledrm driver. > > Checking the aperture base is what was done in all other cases of > preventing generic (fbdev) drivers from stepping on specific drivers' > toes... > Ok, I can re-spin the patch checking if the aperture ranges overlap. There's an apertures_overlap() function in drivers/video/fbdev/core/fbmem.c that can be exported for fbdev drivers to use. Another option is to just say that DRM drivers should be built as a module if the {efi,simple}fb driver are built-in. Best regards, -- Javier Martinez Canillas Linux Engineering Red Hat