From patchwork Thu Oct 24 10:46:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3586 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 110AF3FA04 for ; Thu, 24 Oct 2024 12:47:08 +0200 (CEST) Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-5c94862c3adsf502190a12.3 for ; Thu, 24 Oct 2024 03:47:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1729766827; cv=pass; d=google.com; s=arc-20240605; b=eWlqa3FI8Z7Bz8910bWJu9LioZjL+ByxRGaIE0rvp5Lm3l9vKPHlQeCz2UNBzEtUUS Ay+ki2NIA8FW+bIQG3OB5dIPFuTvSILU6jnRVsWAEdc/bZMliAEQaneA+V1veZ7lGBGM EdGoVDwyxN75tJTX1iSH+27o5gdUnCvgBd0nYAYFyshX3Kjy+rpQud3sV6QLnddUYmxd aJwzmI3UiQfAL4O+EhCZ75Ev5BCNm4oeLzk2VfCKf1jW+dJZTjAWAzGOjyOuEWCTfXJ4 sbnI262yeiE/dd/lFpu2nnLxT82G7rKI1Rws+UvSVP8t0SFyK/H5fOm8KTqdM9t6v5cE qNdA== 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=MiQSoSqWpVxY6NY7a5X61JJD6EXeIPlzT7WuH5PAtxA=; fh=wNHFE7EOqxFLD58JzzE7YWeCJb27cRCdRH5ZoVEpxXI=; b=EO1SHcH/36XXx/zgJs+tRAJ09n8PKPGeVS2uivAsob7fXt0bpDRbAaeMrvuJ48TzWF pKjg9w0qpEu4Y4Da04CQqxLW8bjQVOh5i+CNUYdsJ1cdQQq6M9DYa6ZW7psGjc3BQoqz CyDwNSJK27vg5CoIkNTSH/NfJal+lWAESkJWVZPNlYg2egNdtqSc/jI0ah2ogTiQRq/1 xUtIBE2WbfW2UFQaeqvf/SBybxBiWMUbW/IxdoQFAvA1G1EB2wfh4h7VNxdRv0z0oIKL QHiqutUK8DWSQSJ3nxPlh71z5gn+5LhZDLyczUhxZia9pJtmvATYYWK85H4D0/W1HQeL mOmQ==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=drmYtUK9; 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=1729766827; x=1730371627; 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=MiQSoSqWpVxY6NY7a5X61JJD6EXeIPlzT7WuH5PAtxA=; b=PZjphNOHaobgbtmyMCBR1HeMPV4gtX0vNO4+QNm0TpIlvCj4o24QxFfwhoikWS4WeY jiGWp/x48oTvkx80SZXJfLmcZnk3Ub57GuXmLCfQRm6dIG3M4IrwkcsltRiLsrpiOiiH 2f0XcoPNDG8IRKILJHjzyW1TlZ+vsZk++yp9s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729766827; x=1730371627; 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=MiQSoSqWpVxY6NY7a5X61JJD6EXeIPlzT7WuH5PAtxA=; b=JkSFSShq4P7nNr87siXh1Tw8z39hxzH6pDkM3JnXwJ6DbfyMYGS3mfFv6GfrydBbgm Q1a5DySKJMJkDjDRZUe+2Srb5H8vfUdqNvdWlzIaJ4ZbXIz2rr+JlkrJYwo3fNEpM0um OskUlVoxgxDfdffiKylR1Xg7yk/b86XeyNa8wvizX4eZyYw1sQAGGR7MvjeqiTJwoAuu LTxiB8Ge4shSplE0A7yR+aZooZ/nMovKn0Hf3eanBhJgmDGh6nqxmK0LcZIrYI3dYamv zLbDkVKwILRDZehQsgp1tuZDp9PxEnCjQ7g+SID8YiONR4LgJViHxfN+ipupVF35/DbU LasQ== X-Forwarded-Encrypted: i=2; AJvYcCUG3bRVQV3NaS34zG9GUnrAdGxivrF+vLiWWTiq1NvwRb51pek+6J/H4P5V93gsAYag/5R4W/0c1gEj/Eu8@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yy30t3MzJqa9FcXqyL0voQsaJMePlLX8XMBd8O9/EEoUrMrgGGt nmaZO+iIXgXIhSyoGD/UhJuVavoXvwnCGAnWqFRYUJYB3VbdmB0Ai58OOmuG7yPjWw== X-Google-Smtp-Source: AGHT+IEiZI0IkyRrZ/ij1Ytxu0YLHPOxDzDmMHmPA9HjXe58MAeDGEAgF0UknJI1XNRv4JreKOEWpg== X-Received: by 2002:a05:6402:1955:b0:5cb:6718:7326 with SMTP id 4fb4d7f45d1cf-5cb8ad0734cmr4462366a12.21.1729766827549; Thu, 24 Oct 2024 03:47:07 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:34ca:b0:5c8:9f3e:a9e1 with SMTP id 4fb4d7f45d1cf-5cb9987a691ls75819a12.0.-pod-prod-01-eu; Thu, 24 Oct 2024 03:47:06 -0700 (PDT) X-Received: by 2002:a05:6402:2551:b0:5c5:cbfd:b3a8 with SMTP id 4fb4d7f45d1cf-5cb8ac37f99mr4620139a12.1.1729766825839; Thu, 24 Oct 2024 03:47:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729766825; cv=none; d=google.com; s=arc-20240605; b=gGzb4654nBB/SKi5nwO74ypEC+dfdyE2Lpzgfq5SJW9x2EMyHEnIbgY+nJ1Lwd9kZA +RhZoVTJBokVNxrqXrNghk4HfFhEcN98kIOYqQdhZH7bAUNClE6ROFgehiD51ckJ8Xrk BTJZOeEzI2aEHu76dGB3abuT/EVr7wLm42ilYuNm9tPsTzZoUxPa6oIsLr51mYOKsO85 A9dAr9ogZCkx/sYBTSPn/+GKrR5qEWsb94xyLMfPBAm1ae/v9TKCG2LjYVHDnyQWD1V6 /T1sxGmO1oKaGw6YA14jcwMupqaqOwtwDibyvjdcTgg/DnAZP/JDNi2I/jqahedopqA3 c0Eg== 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=f9ybzaQqZA8Pvjk1KH4zw/EHpgyxOggbtBG60Qj3t28=; fh=P1jVgUWeM7hHwhxMScmcGjS6hU8/sJqNl34Dz5KYsRM=; b=eRyl//DvzEmq9PhR6cilBwgw9MS0Xmje2yr6GMsySu8KkEapbw0O5ggQtc7ji862hr 5Ng4CF1ovDLzt1Y1AhVbQPoyV+U0iU9HYI69DZj3HbD2LUk4hmIgH9wC2yjTsCWJ6M9H bF/voJ3DsOGGpiDJEC6ZzybrzWhvt3uyx0ElkGOvucOzVcZJlEln+PyE0gdXRWx4voTX zAvhRtsQuBYu5bnYZPZBpwuBMn3iR/mXptJiC/Lj2tJr3irGhep/YlBX4O+hVlaR4zRg UUB7bUSU/L4aCap33i0/iLldhy5owmWzg/h3mQUy7Tpv6EFlZu7n31WyTOxN1JjePDqt dRmg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=drmYtUK9; 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 4fb4d7f45d1cf-5cb6694ed95sor3214997a12.2.2024.10.24.03.47.05 for (Google Transport Security); Thu, 24 Oct 2024 03:47:05 -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:6402:278c:b0:5c9:709c:247f with SMTP id 4fb4d7f45d1cf-5cb8ac380damr4405184a12.2.1729766825261; Thu, 24 Oct 2024 03:47:05 -0700 (PDT) Received: from localhost.localdomain ([2001:b07:6474:ebbf:f79d:49dd:b804:3f48]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cb66c72866sm5525261a12.95.2024.10.24.03.47.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2024 03:47:04 -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] drm/mxsfb: Remove generic DRM drivers in probe function Date: Thu, 24 Oct 2024 12:46:49 +0200 Message-ID: <20241024104654.3483125-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=drmYtUK9; 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 --- 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..a8d6dffcd02c 100644 --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c @@ -17,6 +17,7 @@ #include #include +#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 = drm_aperture_remove_framebuffers(&mxsfb_driver); + 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;