From patchwork Tue Sep 3 15:31:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3409 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 100193F360 for ; Tue, 3 Sep 2024 17:32:09 +0200 (CEST) Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-374ba33b2d2sf2497943f8f.2 for ; Tue, 03 Sep 2024 08:32:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1725377528; cv=pass; d=google.com; s=arc-20240605; b=lhuGK4B9N6n481T6scXNzqpaUE0X9LuwrQSXkMpGAzIPyM82HWBAGgX6o8odN/g9Td zq0IhKGSOced4ODc+B2y8t5GWhj+KZDjfMJORZd7EHsTMvLilMXZ5K6a70DsK3vOIx6S g24H99bEDmPpb2D4bU0CktPezDWTASSepkAvTnspZ4T1UDUTdJ4XixKU9zaB00fk2qqj zv+epe98ndPkc7UYwaKT7Hz7XmzCD9idAFZ2cEb3aW4SZvDBJcPq0aHhmAMc2KtUBmh+ xynhSxKY6dKhnTdrbo+e+JQhwanCRBs4KNfpj9EvBXcmFLnJfrfHHTHPlBm47fpiUDXG CBGw== 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:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=kVSb9S15fHc8hmsibCg3dCN36cQBTY+IOTntsTNVY24=; fh=rGfPCzEsW55FXHHNgC5dtPPygyrMknaJONDPsUqOFr8=; b=fGOYl94NO7thNKu/MkunXFLA56Nr+9FoHIecWDIB7vI6INdWjtbz1ezUJ8NXRoYujp NzuqwaMkdSwj91t4WitovNo25hTm0uvtPP07tf1bmBpte8RNONqEa2gpc2I74zhOYlbP jqrEiffUWaM6DMVC/7+zV+aVp8gO92IH7HCxvR4V308iY3VEZ3j7Z3OP0TaOCrOlGoIq Cgg73vupdI+jIUmWfcgTS/VZJ9jj8NB0YqEoVFbbn/KwUVFhYXiE2+kYz1WiNR13JYuw I6lIPk9r/HENL92IrN7FVvD/9y59X+0OxVeQWL6rMbzHjkb2K4vzMYwUZEwoZaToIiA9 9XIQ==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=E3ztCHBD; 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=1725377528; x=1725982328; 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:references:in-reply-to:message-id :date:subject:to:from:from:to:cc:subject:date:message-id:reply-to; bh=kVSb9S15fHc8hmsibCg3dCN36cQBTY+IOTntsTNVY24=; b=j5RIU+UCZu+XS928oJsaekSfw29bDIgtXW3vp1iOcNxjcvcArBX+6YQncDbaZtCawa eaXnOwoT+nt5IlCggZ7lA9mGNA9T+mY5qU/qRc2sjIGozjbCDi/Hhnp2Ppo8nyvLCnrt RZsV4mmXxc4Gr44tJ89SaskhV497X6nWNcsEU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725377528; x=1725982328; 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 :references:in-reply-to:message-id:date:subject:to:from:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=kVSb9S15fHc8hmsibCg3dCN36cQBTY+IOTntsTNVY24=; b=Mzhkh8hC585PSe4j+HIjeYLbKol+lCKCowfPW3ogI/QcqNPTgkQk+X4IMAMyK2zQrn SgBBP+ulsHbYl8sitHs04BZfQriW+afB8iRca9AWEGbRYdcEqC8PJlVsg5Wqvgv7vuUu zxZmkHtRnzxkJ30xRTe7wFentFTm/2bQfgR8CEtTxyPf0C7NxuuHsm+NhbvfT5UDGfyr fObS8HHDvTycxMQFEYZDcOKKd+f9rNnQFohA+lNF8z7+/qo/qOrmCzx44w28u01wCDqb HXLfkSj1IA1IqHT7xSdcNTpTwErHrTnU5qDROQdgH551u7IXNZn40ZPH7RQomUxDh5E5 DahA== X-Forwarded-Encrypted: i=2; AJvYcCXm3nNdKyx7F+NAdyBgQFyoOSMUPVEnsU5/RtRBnIXPSTuSUDS7AYeGp6IDbuvHPDdKrQHQhA6sGG3HiAw2@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YwrA2hhCmPQhtO9szxJJE6vVVlfkMDZMnjWurkzJGoyuTpygCud AJzrtxlrjQJpbj/JiDXhNpxL/1zHgMM83zs+bBmqLV0UBoh3+fAR+S6SqU7jgHNPxg== X-Google-Smtp-Source: AGHT+IFj8/5xNepoRfkQ3fM9bC0wIwAJzzCbQq5SHKC+9i4HcgsW5QL7OQ+5eUm3YSeExOGHP1xEHw== X-Received: by 2002:adf:ef44:0:b0:374:c6b8:50bd with SMTP id ffacd0b85a97d-374ecc67374mr2618555f8f.8.1725377528319; Tue, 03 Sep 2024 08:32:08 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6000:1faf:b0:374:d287:ec15 with SMTP id ffacd0b85a97d-374d287eca1ls575066f8f.1.-pod-prod-03-eu; Tue, 03 Sep 2024 08:32:07 -0700 (PDT) X-Received: by 2002:adf:9b93:0:b0:374:badf:966f with SMTP id ffacd0b85a97d-374ecc67b7fmr2644378f8f.7.1725377526575; Tue, 03 Sep 2024 08:32:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725377526; cv=none; d=google.com; s=arc-20160816; b=oWs/HTHGNBFWE2vXon1m286T18r3XYbIekIK3W87ldYK1KqlsWECqv+7wnQYGp8KZt CYeMLeJsRRLcHxuOAgZWkuGKShnlorfhTgOzoFwZy3DvXITDD3B6BgR6IzOJlEJz+eHX RtKCBMzvQf/NrDcTiMXJESDLyJ5LTjBuzpFcztrAKzLOzNj6a4saQiw+ybsFixUl59Mk 8f0XBeaBPtnNXkgu1YUSjMDoY399JSQPnaEJv54nFuOexNDRLWb9QPx4hjTsJ4oLxnpR 1Agtk49Wj126hUF44HYiS2xU97uQ50Wqjsi3wrRlIRBEL7yR2BLsUQaeLvNVgWxLxj7Y 7cCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=WV3iH0/t9gF1v66Va23JN+U7ZtAwGtNkbC0B7QxXY4I=; fh=FtQepR0uNoeKT2PVdKfTKOkvEYfwbRmoVE9BmlYw3tk=; b=GBFw+KrxS2DI4WUoof+Q5oxLW7oYM+sh7uhwOFV/EkCLGi37gshRaUzAJR//rs2Ve1 iZbTo6OG2JehD8s7Wi/5vRc7yBQ54hTGByxFAY3e66SpKyKsOP5f2UpRd3WpDKYWQ0Sc Syi3GEYnyLV7nmjnTBiXfCmH6H/t9yLKDDTuy2MmwQTlqyxMf70DkDWXDqkkSi3/3to7 aC741f/dtCL75IME647tQGR94OCTKPDWMEFL6IS6YCrsU/rElzwZa5yjOERjnPN3e7Zi nqDZTJXwLCXB4NGvLdtkI+kbyr0Z873gAlUJoucIUEa9e5oNULXfXeVNVg3UhZcvUkGj 5UyA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=E3ztCHBD; 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 5b1f17b1804b1-42bb70af19asor47053155e9.11.2024.09.03.08.32.06 for (Google Transport Security); Tue, 03 Sep 2024 08:32:06 -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:600c:4f46:b0:428:1eff:78ec with SMTP id 5b1f17b1804b1-42c880f3fe2mr33108155e9.18.1725377525752; Tue, 03 Sep 2024 08:32:05 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.42.65]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42baf1b0c18sm192963055e9.37.2024.09.03.08.32.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2024 08:32:05 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Subject: [PATCH 08/10] drm/mxsfb: Remove generic DRM drivers in probe function Date: Tue, 3 Sep 2024 17:31:55 +0200 Message-ID: <20240903153157.918185-8-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240903153157.918185-1-dario.binacchi@amarulasolutions.com> References: <20240903153157.918185-1-dario.binacchi@amarulasolutions.com> 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=E3ztCHBD; 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: 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..1d8dcfd629e1 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 @@ -352,6 +353,15 @@ static int mxsfb_probe(struct platform_device *pdev) struct drm_device *drm; int ret; + /* + * 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"); + drm = drm_dev_alloc(&mxsfb_driver, &pdev->dev); if (IS_ERR(drm)) return PTR_ERR(drm);