mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Faiz Abbas <faiz.abbas@arm.com>
To: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Cc: liviu.dudau@arm.com, maarten.lankhorst@linux.intel.com,
	mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com,
	daniel@ffwll.ch, Amjad Ouled-Ameur <amjad.ouled-ameur@arm.com>,
	Faiz Abbas <faiz.abbas@arm.com>
Subject: [PATCH 3/3] drm/arm/komeda: update DMA mask to 40 bits
Date: Mon, 19 Feb 2024 15:39:15 +0530	[thread overview]
Message-ID: <20240219100915.192475-4-faiz.abbas@arm.com> (raw)
In-Reply-To: <20240219100915.192475-1-faiz.abbas@arm.com>

From: Amjad Ouled-Ameur <amjad.ouled-ameur@arm.com>

Each layer in the DPU has a 40-bit base address register, which indicates
start of frame buffer data for that layer. Komeda driver does not set
its DMA mask, which makes it 32-bit by default which does not use
the entire available possible supported by the DPU.

Update the DMA mask to align with DPU Architecture v1.0 spec.

Signed-off-by: Amjad Ouled-Ameur <amjad.ouled-ameur@arm.com>
Signed-off-by: Faiz Abbas <faiz.abbas@arm.com>
---
 drivers/gpu/drm/arm/display/komeda/komeda_drv.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c
index cc57ea4e13ae..fea5a4818f33 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c
@@ -59,6 +59,10 @@ static int komeda_platform_probe(struct platform_device *pdev)
 	struct komeda_drv *mdrv;
 	int err;
 
+	err = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(40));
+	if (err)
+		return dev_err_probe(dev, err, "DMA mask error\n");
+
 	mdrv = devm_kzalloc(dev, sizeof(*mdrv), GFP_KERNEL);
 	if (!mdrv)
 		return -ENOMEM;
-- 
2.25.1


  parent reply	other threads:[~2024-02-19 10:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-19 10:09 [PATCH 0/3] Fixes for the komeda driver Faiz Abbas
2024-02-19 10:09 ` [PATCH 1/3] drm/arm/komeda: Fix komeda probe failing if there are no links in the secondary pipeline Faiz Abbas
2024-03-06 13:43   ` Liviu Dudau
2024-03-11  8:32     ` Faiz Abbas
2024-02-19 10:09 ` [PATCH 2/3] drm/arm/komeda: Move pipeline prints to after the entire pipeline has been enabled Faiz Abbas
2024-02-19 10:09 ` Faiz Abbas [this message]
2024-02-27 10:52 ` [PATCH 0/3] Fixes for the komeda driver Liviu Dudau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240219100915.192475-4-faiz.abbas@arm.com \
    --to=faiz.abbas@arm.com \
    --cc=airlied@gmail.com \
    --cc=amjad.ouled-ameur@arm.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liviu.dudau@arm.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®