All of lore.kernel.org
 help / color / mirror / Atom feed
From: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
To: <dri-devel@lists.freedesktop.org>,
	<amd-gfx@lists.freedesktop.org>,
	<intel-gfx@lists.freedesktop.org>,
	<nouveau@lists.freedesktop.org>
Cc: shashank.sharma@amd.com, arunpravin.paneerselvam@amd.com,
	Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>,
	arvind.yadav@amd.com, alexander.deucher@amd.com,
	christian.koenig@amd.com
Subject: [PATCH v4 4/4] drm/i915: Clean up page shift operation
Date: Wed, 25 Jan 2023 15:33:15 +0530	[thread overview]
Message-ID: <20230125100315.6214-4-Amaranath.Somalapuram@amd.com> (raw)
In-Reply-To: <20230125100315.6214-1-Amaranath.Somalapuram@amd.com>

Remove page shift operations as ttm_resource moved
from num_pages to size_t size in bytes.

Signed-off-by: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
---
 drivers/gpu/drm/i915/i915_scatterlist.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_scatterlist.c b/drivers/gpu/drm/i915/i915_scatterlist.c
index 114e5e39aa72..bd7aaf7738f4 100644
--- a/drivers/gpu/drm/i915/i915_scatterlist.c
+++ b/drivers/gpu/drm/i915/i915_scatterlist.c
@@ -94,7 +94,7 @@ struct i915_refct_sgt *i915_rsgt_from_mm_node(const struct drm_mm_node *node,
 	if (!rsgt)
 		return ERR_PTR(-ENOMEM);
 
-	i915_refct_sgt_init(rsgt, node->size << PAGE_SHIFT);
+	i915_refct_sgt_init(rsgt, node->size);
 	st = &rsgt->table;
 	if (sg_alloc_table(st, DIV_ROUND_UP_ULL(node->size, segment_pages),
 			   GFP_KERNEL)) {
@@ -105,8 +105,8 @@ struct i915_refct_sgt *i915_rsgt_from_mm_node(const struct drm_mm_node *node,
 	sg = st->sgl;
 	st->nents = 0;
 	prev_end = (resource_size_t)-1;
-	block_size = node->size << PAGE_SHIFT;
-	offset = node->start << PAGE_SHIFT;
+	block_size = node->size;
+	offset = node->start;
 
 	while (block_size) {
 		u64 len;
-- 
2.32.0


WARNING: multiple messages have this Message-ID (diff)
From: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
To: <dri-devel@lists.freedesktop.org>,
	<amd-gfx@lists.freedesktop.org>,
	<intel-gfx@lists.freedesktop.org>,
	<nouveau@lists.freedesktop.org>
Cc: arunpravin.paneerselvam@amd.com,
	Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>,
	arvind.yadav@amd.com, alexander.deucher@amd.com,
	christian.koenig@amd.com
Subject: [Intel-gfx] [PATCH v4 4/4] drm/i915: Clean up page shift operation
Date: Wed, 25 Jan 2023 15:33:15 +0530	[thread overview]
Message-ID: <20230125100315.6214-4-Amaranath.Somalapuram@amd.com> (raw)
In-Reply-To: <20230125100315.6214-1-Amaranath.Somalapuram@amd.com>

Remove page shift operations as ttm_resource moved
from num_pages to size_t size in bytes.

Signed-off-by: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
---
 drivers/gpu/drm/i915/i915_scatterlist.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_scatterlist.c b/drivers/gpu/drm/i915/i915_scatterlist.c
index 114e5e39aa72..bd7aaf7738f4 100644
--- a/drivers/gpu/drm/i915/i915_scatterlist.c
+++ b/drivers/gpu/drm/i915/i915_scatterlist.c
@@ -94,7 +94,7 @@ struct i915_refct_sgt *i915_rsgt_from_mm_node(const struct drm_mm_node *node,
 	if (!rsgt)
 		return ERR_PTR(-ENOMEM);
 
-	i915_refct_sgt_init(rsgt, node->size << PAGE_SHIFT);
+	i915_refct_sgt_init(rsgt, node->size);
 	st = &rsgt->table;
 	if (sg_alloc_table(st, DIV_ROUND_UP_ULL(node->size, segment_pages),
 			   GFP_KERNEL)) {
@@ -105,8 +105,8 @@ struct i915_refct_sgt *i915_rsgt_from_mm_node(const struct drm_mm_node *node,
 	sg = st->sgl;
 	st->nents = 0;
 	prev_end = (resource_size_t)-1;
-	block_size = node->size << PAGE_SHIFT;
-	offset = node->start << PAGE_SHIFT;
+	block_size = node->size;
+	offset = node->start;
 
 	while (block_size) {
 		u64 len;
-- 
2.32.0


WARNING: multiple messages have this Message-ID (diff)
From: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
To: <dri-devel@lists.freedesktop.org>,
	<amd-gfx@lists.freedesktop.org>,
	<intel-gfx@lists.freedesktop.org>,
	<nouveau@lists.freedesktop.org>
Cc: shashank.sharma@amd.com, arunpravin.paneerselvam@amd.com,
	Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>,
	arvind.yadav@amd.com, alexander.deucher@amd.com,
	christian.koenig@amd.com
Subject: [Nouveau] [PATCH v4 4/4] drm/i915: Clean up page shift operation
Date: Wed, 25 Jan 2023 15:33:15 +0530	[thread overview]
Message-ID: <20230125100315.6214-4-Amaranath.Somalapuram@amd.com> (raw)
In-Reply-To: <20230125100315.6214-1-Amaranath.Somalapuram@amd.com>

Remove page shift operations as ttm_resource moved
from num_pages to size_t size in bytes.

Signed-off-by: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
---
 drivers/gpu/drm/i915/i915_scatterlist.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_scatterlist.c b/drivers/gpu/drm/i915/i915_scatterlist.c
index 114e5e39aa72..bd7aaf7738f4 100644
--- a/drivers/gpu/drm/i915/i915_scatterlist.c
+++ b/drivers/gpu/drm/i915/i915_scatterlist.c
@@ -94,7 +94,7 @@ struct i915_refct_sgt *i915_rsgt_from_mm_node(const struct drm_mm_node *node,
 	if (!rsgt)
 		return ERR_PTR(-ENOMEM);
 
-	i915_refct_sgt_init(rsgt, node->size << PAGE_SHIFT);
+	i915_refct_sgt_init(rsgt, node->size);
 	st = &rsgt->table;
 	if (sg_alloc_table(st, DIV_ROUND_UP_ULL(node->size, segment_pages),
 			   GFP_KERNEL)) {
@@ -105,8 +105,8 @@ struct i915_refct_sgt *i915_rsgt_from_mm_node(const struct drm_mm_node *node,
 	sg = st->sgl;
 	st->nents = 0;
 	prev_end = (resource_size_t)-1;
-	block_size = node->size << PAGE_SHIFT;
-	offset = node->start << PAGE_SHIFT;
+	block_size = node->size;
+	offset = node->start;
 
 	while (block_size) {
 		u64 len;
-- 
2.32.0


  parent reply	other threads:[~2023-01-25 10:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-25 10:03 [PATCH v4 1/4] drm/gem: Remove BUG_ON in drm_gem_private_object_init Somalapuram Amaranath
2023-01-25 10:03 ` [Nouveau] " Somalapuram Amaranath
2023-01-25 10:03 ` [Intel-gfx] " Somalapuram Amaranath
2023-01-25 10:03 ` [PATCH v4 2/4] drm/ttm: Clean up page shift operation Somalapuram Amaranath
2023-01-25 10:03   ` [Nouveau] " Somalapuram Amaranath
2023-01-25 10:03   ` [Intel-gfx] " Somalapuram Amaranath
2023-01-25 10:03 ` [PATCH v4 3/4] drm/amdgpu: GDS/GWS/OA cleanup the " Somalapuram Amaranath
2023-01-25 10:03   ` [Nouveau] " Somalapuram Amaranath
2023-01-25 10:03   ` [Intel-gfx] " Somalapuram Amaranath
2023-01-25 10:03 ` Somalapuram Amaranath [this message]
2023-01-25 10:03   ` [Nouveau] [PATCH v4 4/4] drm/i915: Clean up " Somalapuram Amaranath
2023-01-25 10:03   ` [Intel-gfx] " Somalapuram Amaranath
2023-01-25 20:16 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [v4,1/4] drm/gem: Remove BUG_ON in drm_gem_private_object_init Patchwork
2023-01-25 20:53 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-01-26  7:34 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

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=20230125100315.6214-4-Amaranath.Somalapuram@amd.com \
    --to=amaranath.somalapuram@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=arunpravin.paneerselvam@amd.com \
    --cc=arvind.yadav@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=nouveau@lists.freedesktop.org \
    --cc=shashank.sharma@amd.com \
    /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.