From patchwork Fri Oct 25 16:14:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3589 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-lj1-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 52E573F332 for ; Fri, 25 Oct 2024 18:14:55 +0200 (CEST) Received: by mail-lj1-f198.google.com with SMTP id 38308e7fff4ca-2fb60277fb2sf16869461fa.0 for ; Fri, 25 Oct 2024 09:14:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1729872894; cv=pass; d=google.com; s=arc-20240605; b=AWFKk5bUTqgVTSZjl5bMWh8xKtd+dAiaabKN40fKd5F6BOXkswdQcejZ+pDyFrRByc CMeOn0pB9YJarMe1E1w2W/CcOZX1fz51Hpltppvyyo1mbcun2SWSZ+GhhFbXsmSdXOtu 3VDUggkehYH1M7yfv8v9lRCexjKsieyIOEC80uGAY8+9Pjqp1QCtJArgZCpyAqD8K+Ib eQKkqNbZC9DN+VXvDqmketvw0CHGiLEjANEb9GapYA3XYXJhs+3+/YD2NNuPb1XESvtq SLdXoaWGECcAeNPF4KxV7DNd5D1GDlSD2wla3fn+PIjJCKsvsxdZrveDtm9rJNFDMYBG HbBQ== 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=JmkOgreBoqTY4ULBMdxn2R9dhriP5pnmIy+rONaLNcA=; fh=UbgHEtXLPH1EnUAiJwGxoKboMXR1VqtXKbcc5ubijaU=; b=hQBRIBHW1i9C9vEJK9Be/0uwrA833+4j/XKlI4/pl1PxSpgUcErZsYQZBlPcoiWwQE oLKdZyQXQg0svOMFkqU6bJJsiDJHVy8Jnaf9W87usbeaJavxVMeO42kVU4dR55r3AJxX Cas6xL3Z6uFLdTcOJQsScu9SCIoaec4E8cRWzqbk+VYhRsU333bhAgaiHqUxdqtz/miY tIR0aWBUucbuErxRCLyyqjZ+Mig5QoLjF5Ftu/dkp8U2sSRUtf413uu+5Djl13KBXpdp pWgTW3AolCP+UA0ct5cMCqiQd584w8Se+Pg7TPhhVkdDHzOdogvBK3NQXGTXyEA7j6bR 94UA==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=FQlbf99L; 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=1729872894; x=1730477694; 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=JmkOgreBoqTY4ULBMdxn2R9dhriP5pnmIy+rONaLNcA=; b=KTel/GQSavCCiMCVTlh3F64evFULM2HBp+jlRH12HzTHkvY2nokYBWvXdsPl5uAXGG 7UA0OBtqkAUe6FDbJKFzB36ossEEdeScIwG4XKLhg7y/YHlcrQmhVC7YUVdpUFbexzyD fyhx58m7k/SZbs211w6vz3nVRxjbDYvwxA7p0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729872894; x=1730477694; 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=JmkOgreBoqTY4ULBMdxn2R9dhriP5pnmIy+rONaLNcA=; b=sMCHiykUqyqVjBcjGMTZot1mGe66LEt+iswDVbZ5/hGjvxDG6jOdX9kCrjYPsNt4RI 8jIyY3jt8HKaXqIIGJgSdCcKesIWFSG5dGlmWaItbVkiBagpF8PRpfqwZPyPn1E5VUAY l1Vq0AdHUh+FTDmDT0GTpM1WLQhGLnsSrYTp84nKdaopzgP4GrC+LzSE62KRbIl7tM67 7MGgE+ZsMq5/UI3nE1WDGew5VD3pG+2x7t38qIpFEaVsS6UyHHUJw6xCsKB5pydfuyWt 4i/y7HuhR4pGZ66HuAMN8QmHM4QUHQ3tSjZ9+09GKZ4+DGpkXK9Ut+Xd/SrBsAlETIaw wAzQ== X-Forwarded-Encrypted: i=2; AJvYcCW/a74Bl61TUwPMuEdtjcMYnSASrij2AvJaHjwSli4kwpedawGm3xsSAtS/j7nFd+4Rq58FBSOzzusbtySs@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YzTSpsiUgwCL36xuE1c3KsfgE+4Df2XtLQReCgO0OA0On0ZlTDU Zv5LVoYdL25hKNxuCwsWUXwz94oBeMS4eT603QSIPQuy5A0/TdxeBZQzCZdB6LLcDg== X-Google-Smtp-Source: AGHT+IFIsu8U+ZdRjFXjUkhlwf8hvd5thmwL2WOxmgmPalZh+HoxmtNhey4ymYKIXVNnG+KFKGc+zw== X-Received: by 2002:a05:6512:6cc:b0:539:fb49:c489 with SMTP id 2adb3069b0e04-53b1a2fac47mr6199644e87.9.1729872894473; Fri, 25 Oct 2024 09:14:54 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6512:b8a:b0:539:907d:1ec4 with SMTP id 2adb3069b0e04-53b2148f495ls123200e87.1.-pod-prod-03-eu; Fri, 25 Oct 2024 09:14:53 -0700 (PDT) X-Received: by 2002:a05:6512:1293:b0:536:55a9:4b6c with SMTP id 2adb3069b0e04-53b1a307d85mr6438837e87.13.1729872892757; Fri, 25 Oct 2024 09:14:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729872892; cv=none; d=google.com; s=arc-20240605; b=GZicnBa1NjiJJiRp/S8ROaplq71/1vvm4NQteDtHHi7U2nkTPi2Us7jr9rGqsSv4t7 XXlPmZtFs85ahMoFGo73E2aSc0dB8jEDM0rDaBiIxyFz9u/1J2q3D9enWdDNzYZwjhu6 s7Q5SVVfU8hAxb+3VE39jBmhp+hJFPA/7KQ3UcArKmGaqZOohFfQHiQw0S9r4uyvYgSo fH2UlgzhplS3ulKCn0f7oZaYvjzK7d+a/9f0nfKf3NodtXziQeLLLmGBf+97wrm0juTc McXM7WvHRT6fkmU1/t1CHNPuCfj+lUNfrSgYf2FXHKaH/X86ZdzQd+7UcD/ZcMfeHXYr 4KNA== 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=GN13PFFztO+RVXylp070AHdpchWjZze0aJo+onIOSo0=; fh=P1jVgUWeM7hHwhxMScmcGjS6hU8/sJqNl34Dz5KYsRM=; b=Fhv6fOM9n8FDW0jiZPnjnS8PKMb8XHsWWhNENkRRP747cHJp82eSj0npvmb6cjSCl9 OT1LsNOAAREobv0EQkZL8Q54CGBKaRzAOLQFQkbs/XSSNh+fSokMbsnqc8PiOs5PDJ5y cqp3JTwb0cWTaMuMtcSxKzge5lsfjz8RG4FlmbcjX9ZvY9/Br1mGDcMg83qRk0on5Cqf I1E+IG3BpOKRJ81Jm5qCq/YjVuBGueYbX3Efm3gEbsTBRKDi5G5bdyBeDsmRGfEwGF9n 8bB1kC5cH36lwuwsupwmp5ejxxpkTwtzVBbV05fj9/Eoy78eWgUQljKdoxAAduaVIxJo pJoQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=FQlbf99L; 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 2adb3069b0e04-53b2e192af4sor566171e87.18.2024.10.25.09.14.52 for (Google Transport Security); Fri, 25 Oct 2024 09:14:52 -0700 (PDT) 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-Received: by 2002:a05:6512:3054:b0:535:6992:f2cb with SMTP id 2adb3069b0e04-53b1a36c6f3mr6404231e87.42.1729872892194; Fri, 25 Oct 2024 09:14:52 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.. ([2.196.43.251]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4318b579613sm51759005e9.38.2024.10.25.09.14.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 09:14:51 -0700 (PDT) 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: [PATCH v2] drm/mxsfb: Remove generic DRM drivers in probe function Date: Fri, 25 Oct 2024 18:14:25 +0200 Message-ID: <20241025161435.4114877-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=FQlbf99L; 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 --- 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 cb5ce4e81fc7..d140984923fd 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 @@ -360,6 +361,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;