Re: [PATCH] drm/amdgpu: Always align dumb buffer at PAGE_SIZE

2022-09-26 Thread Christian König
I was thinking about that as well, yes. Might be a good idea to just change the alignment check in amdgpu_bo_create():     /* Memory should be aligned at least to a page size. */     page_align = ALIGN(bp->byte_align, PAGE_SIZE) >> PAGE_SHIFT; Something like

Re: [PATCH] drm/amdgpu: Always align dumb buffer at PAGE_SIZE

2022-09-23 Thread lepton
On Thu, Sep 22, 2022 at 10:14 PM Christian König wrote: > > Am 23.09.22 um 01:04 schrieb Lepton Wu: > > Since size has been aligned to PAGE_SIZE already, just align it > > to PAGE_SIZE so later the buffer can be used as a texture in mesa > > after

[PATCH] drm/amdgpu: Always align dumb buffer at PAGE_SIZE

2022-09-23 Thread Lepton Wu
Since size has been aligned to PAGE_SIZE already, just align it to PAGE_SIZE so later the buffer can be used as a texture in mesa after https://cgit.freedesktop.org/mesa/mesa/commit/?id=f7a4051b8 Otherwise, si_texture_create_object will fail at line "buf->alignment < tex->surface.alignment"

Re: [PATCH] drm/amdgpu: Always align dumb buffer at PAGE_SIZE

2022-09-23 Thread Marek Olšák
The kernel could report the true alignment from the ioctl instead of 0. Marek On Fri, Sep 23, 2022 at 1:31 AM Christian König wrote: > Am 23.09.22 um 07:28 schrieb lepton: > > On Thu, Sep 22, 2022 at 10:14 PM Christian König > > wrote: > >> Am 23.09.22 um 01:04 schrieb Lepton Wu: > >>> Since

Re: [PATCH] drm/amdgpu: Always align dumb buffer at PAGE_SIZE

2022-09-22 Thread Christian König
Am 23.09.22 um 07:28 schrieb lepton: On Thu, Sep 22, 2022 at 10:14 PM Christian König wrote: Am 23.09.22 um 01:04 schrieb Lepton Wu: Since size has been aligned to PAGE_SIZE already, just align it to PAGE_SIZE so later the buffer can be used as a texture in mesa after

Re: [PATCH] drm/amdgpu: Always align dumb buffer at PAGE_SIZE

2022-09-22 Thread Christian König
Am 23.09.22 um 01:04 schrieb Lepton Wu: Since size has been aligned to PAGE_SIZE already, just align it to PAGE_SIZE so later the buffer can be used as a texture in mesa after https://cgit.freedesktop.org/mesa/mesa/commit/?id=f7a4051b8 Otherwise, si_texture_create_object will fail at line