dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@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
Subject: Re: [RFC PATCH 5/6] drm/qxl: don't use ttm bo->offset
Date: Thu, 13 Feb 2020 18:26:11 +0100	[thread overview]
Message-ID: <a87cb8e9-8697-88b0-9b70-7bc8c0a25884@amd.com> (raw)
In-Reply-To: <20200213143053.tkbfd6wr5rbspzty@sirius.home.kraxel.org>

Am 13.02.20 um 15:30 schrieb Gerd Hoffmann:
>> @@ -311,10 +311,8 @@ qxl_bo_physical_address(struct qxl_device *qdev, struct qxl_bo *bo,
>>   		(bo->tbo.mem.mem_type == TTM_PL_VRAM)
>>   		? &qdev->main_slot : &qdev->surfaces_slot;
>>   
>> -	WARN_ON_ONCE((bo->tbo.offset & slot->gpu_offset) != slot->gpu_offset);
>> -
>> -	/* TODO - need to hold one of the locks to read tbo.offset */
>> -	return slot->high_bits | (bo->tbo.offset - slot->gpu_offset + offset);
>> +	return slot->high_bits | ((bo->tbo.mem.start << PAGE_SHIFT) +
>> +				  slot->gpu_offset + offset);
>>   }
> --verbose please.

The warning and the TODO should probably stay, don't they?

> I don't get the logic behind this change.

We ran into the problem that the whole offset handling in TTM is 
actually completely hardware specific.

E.g. Some need pfn, some need byte offsets, some need 32bit, some 64bit 
and some don't have a consistent offset at all (e.g. amdgpu for exmaple).

So we try to move that back into the drivers to concentrate on memory 
management in TTM.

>
> The other chunks look sane, calculating slot->gpu_offset
> in setup_slot() certainly makes sense.

Thanks for the review,
Christian.

>
> cheers,
>    Gerd
>

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

  parent reply	other threads:[~2020-02-13 17:26 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-13 12:01 [RFC PATCH 0/6] do not store GPU address in TTM Nirmoy Das
2020-02-13 12:01 ` [RFC PATCH 1/6] drm/amdgpu: move ttm bo->offset to amdgpu_bo Nirmoy Das
2020-02-13 12:01 ` [RFC PATCH 2/6] drm/radeon: don't use ttm bo->offset Nirmoy Das
2020-02-13 12:18   ` Christian König
2020-02-13 12:31     ` Nirmoy
2020-02-13 13:00       ` Christian König
2020-02-13 13:28         ` Nirmoy
2020-02-14 14:12           ` Christian König
2020-02-13 13:30         ` Nirmoy
2020-02-13 12:02 ` [RFC PATCH 3/6] drm/vmwgfx: " Nirmoy Das
2020-02-13 12:02 ` [RFC PATCH 4/6] drm/nouveau: " Nirmoy Das
2020-02-13 12:02 ` [RFC PATCH 5/6] drm/qxl: " Nirmoy Das
2020-02-13 14:30   ` Gerd Hoffmann
2020-02-13 14:52     ` Nirmoy
2020-02-14  9:08       ` Gerd Hoffmann
2020-02-14 11:55         ` Nirmoy
2020-02-13 17:26     ` Christian König [this message]
2020-02-13 12:02 ` [RFC PATCH 6/6] drm/ttm: do not keep GPU dependent addresses Nirmoy Das
2020-02-13 12:19 ` [RFC PATCH 0/6] do not store GPU address in TTM Christian König
2020-02-13 14:35 ` Huang Rui
2020-02-14  9:19 ` Thomas Zimmermann
2020-02-14 10:29   ` Nirmoy

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=a87cb8e9-8697-88b0-9b70-7bc8c0a25884@amd.com \
    --to=christian.koenig@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=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;
as well as URLs for NNTP newsgroup(s).