From patchwork Thu Dec 5 16:24:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3711 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 645023F1CD for ; Thu, 5 Dec 2024 17:24:38 +0100 (CET) Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-aa622312962sf101032166b.2 for ; Thu, 05 Dec 2024 08:24:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1733415878; cv=pass; d=google.com; s=arc-20240605; b=YOkYs3wdjnzRhSodZGn6N6TFFAg0qBAa9maPtpBUGwdJZLnJsV/MkC5QmCcwA5eIA1 Xx/IvWCen6/mJ9y/91p1JpzUbrcgXtUCQKUDKkarO27Z2UnWssseIjwvSo2JYP98qYin VjtSN4tOTJsuGgY7ejNw/ZVdTaIlN7Vf8ij0xpqJi3bqCTRIOHMk6M+glknLZD9apjqX dAgiyGu55GnGE3EKco477Syx5Pz6bgEEQkhv7ZAQFrgfZdMw5t0/twgwcw2u1fBIUYQH WSO+jq4oE78/5cWYSFTNEV8cFs2v+x/Ia4n8Jpzd5PlVPOI2kTiUprFkbK3UaX17pGM1 /fng== 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=fYrT9ZEFbSd5mioSLnjl7yqs5b4yHR3bBe7Xkdo5ktU=; fh=h9bnt579E/SnSI8itoKxpAEP7un4XfwuaKh9sHlJfOU=; b=lmoNZh5SzbF7mAAew4hsX3861GLI7xbBqwjmUN/M70wiCtd3tnYJCurrXzQtuHquT7 d996wqAEirNAfk7/xklgGe47Y5hwayZ8KZSQRH5961ptxeiRIasYw9Sn+yXq2r5gQx7J dc/mT3ILvRhjT75Cy+y9XY27MWy6EBQmSolkU0b4+gBBj3GP5ADbqKPwFVp5F+E3nowu WD4JMCS0FHsxPHfXspwkbz0Nitur2nFDCzJ78GvH9VJgzBzioNpZnVGFeEga7q2uvx3x ZQGJa3phc6yyVwdxapHUWwuqspvSGmPJrmdDdaUS97FFwiZHaaYHmGXyMObs+IiW4NtH oPXw==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RlfeGupE; 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=1733415878; x=1734020678; 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=fYrT9ZEFbSd5mioSLnjl7yqs5b4yHR3bBe7Xkdo5ktU=; b=S2Fn7p1w65i+1dXwe/3LBG9buyZY5H5M1kFxoBPlCEuwlA97+nEcAsgivtZLTgKvUy kN31huC1AL866H71cnKbZMJ2PgV4FNinELv7oaSNtN3qrbx4zZ67yYYKe6sitASqVhqd +qeGjqNPtnD17cs9V/GXdu4hBvuR6L6elfIss= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733415878; x=1734020678; 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=fYrT9ZEFbSd5mioSLnjl7yqs5b4yHR3bBe7Xkdo5ktU=; b=nlifEeHOFGCYDg1e/hjwaPj+ZwrTDlwydBIKX1B9xyC8AyZBSKKHFClA5UsEtz4BO+ a9cZwiT5DmUmAmX3Y8/aQ9i3dq59Bu2BQdYXFoLDNSR+sULJygcnQFgsTfiJ3mZDCDze NP07spnYulpadUjGsSGsc8o6kZ7OEA0j/ZncIhgfRHFOKHJS4nN9LtlyTGUIqv0hr99a 39L3wAO6k2mWLi66mxCCST4bvQoPzDMLzy4fq4TjbihPLapE5W9+BdlR92rIznq0MBnK gQSymGsYZh1+E7bgE94ZjVq6x1l5sw6FfgZSFx4V4rAQydPg1rJ+SfBwdBKOjqqPHekM wGkg== X-Forwarded-Encrypted: i=2; AJvYcCWA+mwYe900YtWg3LUSZwFfLtJFGlR8rNft+PfwFhfOPBQUgESeDkRwXilwhemOXRLZ+cJd1KZPiDnxyJW5@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YyUstuZhBULMPzidZSbTN9L8+9Xx8pT3Y3ZuZR5NlQaKq9Nu0uD +g9DtCfkY8Efc5otImtlgVZBdk5TdBKep5wVHMXMzCy9RiU90pNIXg+JTWs1tcL51g== X-Google-Smtp-Source: AGHT+IEKPleaZiXvk448CBi07hCviN0go+PiOaquT5EE8nmJr7TynRd/eVjsL5N8hvfAi9xMqbBUUw== X-Received: by 2002:a17:907:7842:b0:aa6:24f5:948f with SMTP id a640c23a62f3a-aa624f59576mr285645066b.20.1733415877891; Thu, 05 Dec 2024 08:24:37 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:344:b0:5d0:aff8:230d with SMTP id 4fb4d7f45d1cf-5d12505020cls53858a12.0.-pod-prod-03-eu; Thu, 05 Dec 2024 08:24:36 -0800 (PST) X-Received: by 2002:a17:906:2192:b0:aa5:47f8:b923 with SMTP id a640c23a62f3a-aa5f7f8294amr1119414866b.61.1733415875985; Thu, 05 Dec 2024 08:24:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733415875; cv=none; d=google.com; s=arc-20240605; b=hfEHqBeGsIPRlWGvR4nJ01eXtSYOzWBQxe4jIDYqW/FzqTf/krRjv4GBd+DDYUVpzb SJNFDs3aKY7M+MhiGdH+NzWLEPp7kOZAwcTs2u5icethA+SQFrmlSW/HlTK6xion4uXs u4SEB0Xlm3MOFImPre9o2TctiIx0V7NN1Wzlt0nOBCcBdRSpO5UoZnRWFQCBjiyesgPZ E0bVzmVMq6Twpz6vMcECHziiDzgQd4RcUKkFVVshk7ZEM/HxULPSAFqS/TKvoXWqLDfC QJJK+UgLhahHckuMuFMLuNexBdB5uzyRqBLt5A4xM9y9Ib6H9OV2fWgE2oaPh01gU4HS uGUw== 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=Q+EB++J/yowUMrD7IvepBqWDVig6KUMpfQ1WpjD4ens=; fh=P1jVgUWeM7hHwhxMScmcGjS6hU8/sJqNl34Dz5KYsRM=; b=g9Sd8HCuy7MkyLBq/v1QqnZpXwSy9hjA6rPv5uXBzOEf+P34ztnlIvDsMB/NqHHUrZ eYCcXwd8O3kDIRBmzO6GUflG18b+DGXHoMNMo/JA1wsUdS1h53qh+Hpqr3ZMs9/mv0Zc hiT8SZaxtkfWPRHeyFrLyJrOdLTsR1tpMCbc12JIHU8oZNKtwSfykszZkhB0IWOEAG4c XAuzd/UD28OGJPHZBdO9vcgrUOSQvrqfy1X5ThRCnYJ8lZZXV+H6tg4uFkeks2EGZmn7 N1SzdTvbqlyA4m2wrQGkQRGpgxXuxgiTy1NRCfDbd0C5E3KONv8Gk0/ApnwXv8e7tnVa BKuA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RlfeGupE; 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 a640c23a62f3a-aa625f4f8b2sor102418266b.8.2024.12.05.08.24.35 for (Google Transport Security); Thu, 05 Dec 2024 08:24:35 -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: ASbGnct40yGhFp1EAcPQJqJYwo1lpiWnCeWYzSlUCMs1WKu56yXYHkMzySHmOfsaadB L3dlGwWbz8uB/AkYhro/Ssv1hpfZbdmayYDYlE7fwoFqvm9cuPejKo4E6JzFi6Kf8znK4kqTVjN hOfmbHRoFox38XANPFnmpchFqunTdXQ4P3Y5bQwb5WwTBxjfQXDkngBwJeEugy49yxBKtBUXHvJ oEYjCFvQBtExntwBr1F8MmduZMUb1XiCTrDAIUWgJOndgfilTRbAiCQpAUCUysReH89+5WtYYxL 2KC2aHjdocuK/NfiigZlYYY02eOrOukUVhXfAgPxaIjL5A== X-Received: by 2002:a17:906:9c0f:b0:aa6:24a2:697b with SMTP id a640c23a62f3a-aa624a27056mr315906766b.27.1733415875558; Thu, 05 Dec 2024 08:24:35 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2001:b07:6474:ebbf:61a1:9bc8:52c6:3c2d]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aa625e4dee6sm112286566b.32.2024.12.05.08.24.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Dec 2024 08:24:35 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Michael Trimarchi , David Airlie , Fabio Estevam , Maarten Lankhorst , Marek Vasut , Maxime Ripard , Pengutronix Kernel Team , Sascha Hauer , Shawn Guo , Simona Vetter , Stefan Agner , Thomas Zimmermann , dri-devel@lists.freedesktop.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: [RESEND PATCH v2] drm/mxsfb: Remove generic DRM drivers in probe function Date: Thu, 5 Dec 2024 17:24:23 +0100 Message-ID: <20241205162432.1803869-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=RlfeGupE; 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 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 6b95e4eb3e4e..10da8b54f4c6 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 @@ -362,6 +363,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;