From patchwork Wed Mar 5 14:09:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3853 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 38C8F3F15E for ; Wed, 5 Mar 2025 15:09:37 +0100 (CET) Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-390f11e6fdbsf2431555f8f.0 for ; Wed, 05 Mar 2025 06:09:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1741183777; cv=pass; d=google.com; s=arc-20240605; b=C0oUuHDvmz8AIBLT8g1J9plLX8yIfM+ADHaCciCUs4UhCyjSVaWy5DiL2eKom3LDN3 mtduwu6nV5/jMhIBlZ5W3GzTpIh63QKskJIjUjsATH0V7NF8kdqDtANvx4VaPw3tnawu tJBZ/6svZAZtOlXGVR4qf6OGWgK4MRzfKrCIe4by7BDSyORUHFGxJLR9mdvQ9+EwyaxU zJHt8IMTr05XW93pNJsoZprlEyYp3/CRulIOhrWLffWpE6KFaC1gUOHr6PZg1B54FCD0 8wbWo3/ydxH4w3a9xS0kzLe+i62YEpLpeBVDZMSY1f3hNdkYHmyiMbQkD4soaaHHxQqy SM0w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=F1+Q+JBe3UUa6oZM5qSyNXwOiYSNHQnTrnh6O8CIfMU=; fh=hg5yZkl4puFTncbLzfmQI6QesnUEJtBlq7e/T1Egu34=; b=FipbwFeaE72Z80kEJEfMJyZMIw+b2eXXm7GNXyIxbGiKIdpfe8hY+86CXvM5DT0JuN kw7HPXc6L9lcV+1DWDbSK1fitzQR930HT60Ail6onukVJv90yKyf6cl90zcvvvR5KP1z VsCu2ls03g/KV+XZ719aiUpVgn+5FhYj1OVS+S+seDwdkSS1h8R5hRp9jNq3hGtHayjI hn6eoXMXkiwmaQhO2LJUFijUBav4q5BBFxanbzdnEhnOGltwaFz2Gp4ZVdytIx9Z0/N6 kD8ooi4rt3NiQM2NUBbv/iwCBJWnQjXGh2aKw3zxm95Zj+uvuonqxV9GKXmdKm0P1Pmd STWQ==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=bal0cALq; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1741183777; x=1741788577; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:cc:to:from :from:to:cc:subject:date:message-id:reply-to; bh=F1+Q+JBe3UUa6oZM5qSyNXwOiYSNHQnTrnh6O8CIfMU=; b=UGkvK9LZU1hxuGvhHsNeYI17gcHDB1zx2/gnYzUbZJCurDrBYA0nxSLeqIzFPn0sIj WaIwEOJgQ/Yen2bAUtv4YExwDDH8pLugzPqUwdd71YT/EB2zO5b/mlj9BUjnjLkKSD22 bv5ATk2NBnlxb4606BaKbjH7cXdA/ar9nVRc4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741183777; x=1741788577; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:cc:to:from:x-beenthere:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=F1+Q+JBe3UUa6oZM5qSyNXwOiYSNHQnTrnh6O8CIfMU=; b=AMoq2CydV3GyE97LdANOzwjfNVDyn9vpwjEgJpwhQ6cCNfpqD/61NOj2h5frBmgkSG IHpRL1WT6kFYcx85rb2aNQ6gGwYdzDg520kW05ADinYwbL38HD7A6/ZseULOgb9L0wu+ 42ZI+NY07asgihRWJQoHyibsy9XLpQO7xSM/sqYnEKbr9jE3bsFNreibFDv8FTdkuS3z TyBJ8b48n4UPYD39ATATYY1z0Wwub9mp93EGxh8TtnIBrLLfBdxqaGNE3GBTVQ8HqLhY 4B0sTnqvTR5reR0/PBjvGbLGez7DTcLj+Jh/ENt1rjvRvOcBROI9q4S1EzJu2/3HgXfQ Tojg== X-Forwarded-Encrypted: i=2; AJvYcCVFswo/k5l+YRbwMeCYQ0zejUknZh+YX1bU/J5RqHb/1jSmrzZxmlY1T4omH/sZnnd+4XXW6AzsXnKbH6mw@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YxAIzGrMo0msX6xyIP5QDwLAfv2+iA2sAc2BcGfsG6OcqmeO1GR xwclrX1ziJRLlToFQd8M0KgbeYCL8k0ee1XfYp/38Av4E5v0Mbf5QdSc09669IFt1A== X-Google-Smtp-Source: AGHT+IGCjagxziyKH2DSczV1DAJ08owJAGiEdvRUM6vpvFXMlMTP2Boa/ouqcpDBM3tgULnKIVO11Q== X-Received: by 2002:a05:6000:18ac:b0:390:feb7:1f65 with SMTP id ffacd0b85a97d-3911f7c868emr2995172f8f.49.1741183776505; Wed, 05 Mar 2025 06:09:36 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com; h=Adn5yVHcpbfyw0V0qDglc0CnX1dM0MN1GZm8jbctzqc9tUNKiA== Received: by 2002:a05:6000:400a:b0:390:dd70:6845 with SMTP id ffacd0b85a97d-390e1211d41ls3586057f8f.0.-pod-prod-01-eu; Wed, 05 Mar 2025 06:09:33 -0800 (PST) X-Received: by 2002:a05:6000:1faa:b0:391:ab2:9e80 with SMTP id ffacd0b85a97d-3911f755074mr3022864f8f.24.1741183773459; Wed, 05 Mar 2025 06:09:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1741183773; cv=none; d=google.com; s=arc-20240605; b=LDtxBlRYwJkkUWm2O6fo8n8b4WT/gj37X4WjGRe/L98ViQaOfkMuZw+fmQDT1N5S5W 7FQxAmAgy43CBCs3AY5BuuOT27sDOrno3KdV9RtVbUbDBSmko5DJKiBDdghZ1pQ6nJp9 23woN381RqJBk2GwzAQXVPnajdtZVOU+izSH/UOuF3/gvEyCtWBzZw1DcM53lFF4WKTo Jy54/d3T25qstZ+Gn4vP0dvvWkNWBRjsfuUBx0Vp4nFUFTZZ53MT84LrA4BwgYaE+Pu1 4eJdiizl/cOos+7emtaHHnEMm4E2mKIhHGo/mT0ENzwOLavYR5g3hiHHu/PMUr0mfILp vEvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=jC9QV0bJcgZgqHHH3SUMbf/vptPD4PQ0vRL1kkv5HIw=; fh=LqEv44mUsiWM68Dy8UwVIeFSJy+QEKaw2SkgTFpg/h0=; b=GQ+cPO70YjVhajYhtDAIjBNWxRg6RN4W/Ghh2X+jShtm0s5QVpKvEhdslbGhnnsoZU VignkScMqQKKxzId00MIA4kxzi/7eNiJnAcgoYzQt39mbnacnAczzIKOK8C5u7dI1z5c q57x/Tv0drI8F0uKWGoHI9PKRK4WVXzlkwBqGevpDHBUkHiNbV5Q70X1r+aV5DavS3B5 tD+CdQ/2cDe2LxpJOylONLLQLMRLckEoCJIUbIspgSb0JEo/xjsKFPARMU6SSQTu8Wjg eGaOTVbCIzQCoY241lKIpPOJuQq/P5HI8FwkweJnzcPpnM0VSbq3jKuvf2XwIYDl9ygg gkOQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=bal0cALq; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id ffacd0b85a97d-390e4896fb4sor4391415f8f.9.2025.03.05.06.09.33 for (Google Transport Security); Wed, 05 Mar 2025 06:09:33 -0800 (PST) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Gm-Gg: ASbGncvzLNnnU0elAn4zpeRSoLUngRnk/JPeZiY48yaBWb8R4HwfIozIO8zjEJIHAVQ 0tw25+emu68bul4WGQUHBtzGoscrCBrjiWRtNCiRuDsnpUYqRfBgESMtjgzDM/Yg4V/yPnqBN/o Madx1VyhQx9ewYW+3GUZYLWkJKGj4xGWKgUG+iB664Qp8EFuw8QgfhOIkkaT7iU9DRaVSgOXHv4 7ICOWaqN8APSp9BuBqxML1XJDtquDUsrfx37jDExU/njXAwyXbghAvVhHEWJ4YkXExs5K3Im5IT 8Cue8e/N1fRsf/0tVa94nJtoeGqJoMNvug0vitVPSoA5bIqy/9uVJZmnrhPW0AGIQmzrmNp+k8p tPkQy X-Received: by 2002:a05:6000:1546:b0:390:df02:47f0 with SMTP id ffacd0b85a97d-3911f7bb461mr2279778f8f.42.1741183772882; Wed, 05 Mar 2025 06:09:32 -0800 (PST) Received: from localhost.localdomain ([2001:b07:6474:ebbf:334:5d7f:7a52:9e84]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-390e4847e62sm21374802f8f.67.2025.03.05.06.09.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Mar 2025 06:09:32 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Michael Trimarchi , Thomas Zimmermann , David Airlie , Fabio Estevam , Maarten Lankhorst , Marek Vasut , Maxime Ripard , Pengutronix Kernel Team , Sascha Hauer , Shawn Guo , Simona Vetter , Stefan Agner , dri-devel@lists.freedesktop.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: [RESEND PATCH v3] drm/mxsfb: Remove generic DRM drivers in probe function Date: Wed, 5 Mar 2025 15:09:16 +0100 Message-ID: <20250305140929.174398-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=bal0cALq; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Use aperture helpers to remove all generic graphics drivers before loading mxsfb. Makes mxsfb compatible with simpledrm. Co-developed-by: Michael Trimarchi Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi Reviewed-by: Thomas Zimmermann --- Changes in v3: - Add 'Reviewed-by' of Thomas Zimmermann Changes in v2: - Use aperture_remove_all_conflicting_devices() instead of drm_aperture_remove_framebuffers(). drivers/gpu/drm/mxsfb/mxsfb_drv.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c index 59020862cf65..e5eb644b54ae 100644 --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c @@ -8,6 +8,7 @@ * Copyright (C) 2008 Embedded Alley Solutions, Inc All Rights Reserved. */ +#include #include #include #include @@ -361,6 +362,15 @@ static int mxsfb_probe(struct platform_device *pdev) if (ret) goto err_free; + /* + * Remove early framebuffers (ie. simplefb). The framebuffer can be + * located anywhere in RAM + */ + ret = aperture_remove_all_conflicting_devices(mxsfb_driver.name); + if (ret) + return dev_err_probe(&pdev->dev, ret, + "can't kick out existing framebuffers\n"); + ret = drm_dev_register(drm, 0); if (ret) goto err_unload;