All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kiarash Hajian <kiarash8112hajian@gmail.com>
To: dmitry.baryshkov@linaro.org
Cc: robdclark@gmail.com, quic_abhinavk@quicinc.com,
	tzimmermann@suse.de, sean@poorly.run,
	marijn.suijten@somainline.org, linux-arm-msm@vger.kernel.org,
	maarten.lankhorst@linux.intel.com, mripard@kernel.org,
	Kiarash Hajian <kiarash8112hajian@gmail.com>
Subject: [PATCH 1/1] drm/msm: request memory region
Date: Fri,  5 Apr 2024 12:22:07 -0400	[thread overview]
Message-ID: <20240405162213.28263-2-kiarash8112hajian@gmail.com> (raw)
In-Reply-To: <20240405162213.28263-1-kiarash8112hajian@gmail.com>

The driver's memory regions are currently just ioremap()ed, but not
reserved through a request. That's not a bug, but having the request is
a little more robust.

Implement the region-request through the corresponding managed
devres-function.

Signed-off-by: Kiarash Hajian <kiarash8112hajian@gmail.com>
---
 drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 2 +-
 drivers/gpu/drm/msm/msm_io_utils.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
index 8bea8ef26f77..e4f7c282799b 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
@@ -1503,7 +1503,7 @@ static void __iomem *a6xx_gmu_get_mmio(struct platform_device *pdev,
 		return ERR_PTR(-EINVAL);
 	}
 
-	ret = ioremap(res->start, resource_size(res));
+	ret = devm_ioremap_resource(&pdev->dev, res);
 	if (!ret) {
 		DRM_DEV_ERROR(&pdev->dev, "Unable to map the %s registers\n", name);
 		return ERR_PTR(-EINVAL);
diff --git a/drivers/gpu/drm/msm/msm_io_utils.c b/drivers/gpu/drm/msm/msm_io_utils.c
index afedd61c3e28..34e598ce869a 100644
--- a/drivers/gpu/drm/msm/msm_io_utils.c
+++ b/drivers/gpu/drm/msm/msm_io_utils.c
@@ -83,7 +83,7 @@ static void __iomem *_msm_ioremap(struct platform_device *pdev, const char *name
 
 	size = resource_size(res);
 
-	ptr = devm_ioremap(&pdev->dev, res->start, size);
+	ptr = devm_ioremap_resource(&pdev->dev, res);
 	if (!ptr) {
 		if (!quiet)
 			DRM_DEV_ERROR(&pdev->dev, "failed to ioremap: %s\n", name);
-- 
2.43.0


  reply	other threads:[~2024-04-05 16:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-05 16:22 [PATCH 0/1] drm/msm: request memory region Kiarash Hajian
2024-04-05 16:22 ` Kiarash Hajian [this message]
2024-04-05 18:18   ` [PATCH 1/1] " Dmitry Baryshkov
2024-04-07 16:10   ` Bjorn Andersson
  -- strict thread matches above, loose matches on Subject: below --
2024-04-05 14:50 [PATCH 0/1] " Kiarash Hajian
2024-04-05 14:50 ` [PATCH 1/1] " Kiarash Hajian
2024-04-05 15:25   ` Dmitry Baryshkov
2024-04-05  0:39 [PATCH 0/1] " Kiarash Hajian
2024-04-05  0:39 ` [PATCH 1/1] " Kiarash Hajian

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=20240405162213.28263-2-kiarash8112hajian@gmail.com \
    --to=kiarash8112hajian@gmail.com \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=marijn.suijten@somainline.org \
    --cc=mripard@kernel.org \
    --cc=quic_abhinavk@quicinc.com \
    --cc=robdclark@gmail.com \
    --cc=sean@poorly.run \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.