dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nirmoy <nirmodas@amd.com>
To: Gerd Hoffmann <kraxel@redhat.com>, Nirmoy Das <nirmoy.aiemd@gmail.com>
Cc: thellstrom@vmware.com, amd-gfx@lists.freedesktop.org,
	airlied@linux.ie, kenny.ho@amd.com, brian.welty@intel.com,
	dri-devel@lists.freedesktop.org, nirmoy.das@amd.com,
	linux-graphics-maintainer@vmware.com, bskeggs@redhat.com,
	alexander.deucher@amd.com, sean@poorly.run,
	christian.koenig@amd.com
Subject: Re: [PATCH 6/7] drm/bochs: don't use ttm bo->offset
Date: Mon, 17 Feb 2020 13:52:39 +0100	[thread overview]
Message-ID: <c8cee9fa-3501-9799-a12e-2ba73f5f9cc6@amd.com> (raw)
In-Reply-To: <20200217124119.et35zk6ndp73nlfy@sirius.home.kraxel.org>


On 2/17/20 1:41 PM, Gerd Hoffmann wrote:
> On Mon, Feb 17, 2020 at 11:18:40AM +0100, Nirmoy Das wrote:
>> Calculate GPU offset within bochs driver itself without depending on
>> bo->offset
>>
>> Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
>> ---
>>   drivers/gpu/drm/bochs/bochs_kms.c     | 3 ++-
>>   drivers/gpu/drm/drm_gem_vram_helper.c | 2 +-
>>   2 files changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c
>> index 8066d7d370d5..852ec7910d84 100644
>> --- a/drivers/gpu/drm/bochs/bochs_kms.c
>> +++ b/drivers/gpu/drm/bochs/bochs_kms.c
>> @@ -38,7 +38,8 @@ static void bochs_plane_update(struct bochs_device *bochs,
>>   			 state->crtc_x,
>>   			 state->crtc_y,
>>   			 state->fb->pitches[0],
>> -			 state->fb->offsets[0] + gbo->bo.offset);
>> +			 state->fb->offsets[0] +
>> +			 (gbo->bo.mem.start << PAGE_SHIFT));
> I'd suggest to use drm_gem_vram_offset() here ...
>
>> diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c
>> index 92a11bb42365..e7ef4cd8116d 100644
>> --- a/drivers/gpu/drm/drm_gem_vram_helper.c
>> +++ b/drivers/gpu/drm/drm_gem_vram_helper.c
>> @@ -214,7 +214,7 @@ s64 drm_gem_vram_offset(struct drm_gem_vram_object *gbo)
>>   {
>>   	if (WARN_ON_ONCE(!gbo->pin_count))
>>   		return (s64)-ENODEV;
>> -	return gbo->bo.offset;
>> +	return gbo->bo.mem.start << PAGE_SHIFT;
> ... and move this to a separate patch.  The vram helpers are used by
> more drivers than just bochs.

Thanks for reviewing Gerd, will send next version with your suggestions 
applied.


Regards,

Nirmoy

>
> cheers,
>    Gerd
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2020-02-17 12:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-17 10:18 [RFC PATCH 0/6] do not store GPU address in TTM Nirmoy Das
2020-02-17 10:18 ` [PATCH 1/7] drm/amdgpu: move ttm bo->offset to amdgpu_bo Nirmoy Das
2020-02-17 11:07   ` Christian König
2020-02-17 10:18 ` [PATCH 2/7] drm/radeon: don't use ttm bo->offset Nirmoy Das
2020-02-17 10:18 ` [PATCH 3/7] drm/vmwgfx: " Nirmoy Das
2020-02-17 11:09   ` Christian König
2020-02-17 11:18     ` Nirmoy
2020-02-17 10:18 ` [PATCH 4/7] drm/nouveau: " Nirmoy Das
2020-02-17 12:12   ` Christian König
2020-02-17 10:18 ` [PATCH 5/7] drm/qxl: " Nirmoy Das
2020-02-17 12:38   ` Gerd Hoffmann
2020-02-17 10:18 ` [PATCH 6/7] drm/bochs: " Nirmoy Das
2020-02-17 12:41   ` Gerd Hoffmann
2020-02-17 12:52     ` Nirmoy [this message]
2020-02-17 10:18 ` [PATCH 7/7] drm/ttm: do not keep GPU dependent addresses Nirmoy Das

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=c8cee9fa-3501-9799-a12e-2ba73f5f9cc6@amd.com \
    --to=nirmodas@amd.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=brian.welty@intel.com \
    --cc=bskeggs@redhat.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kenny.ho@amd.com \
    --cc=kraxel@redhat.com \
    --cc=linux-graphics-maintainer@vmware.com \
    --cc=nirmoy.aiemd@gmail.com \
    --cc=nirmoy.das@amd.com \
    --cc=sean@poorly.run \
    --cc=thellstrom@vmware.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox