]> git.baikalelectronics.ru Git - kernel.git/commit
drm/etnaviv: rework linear window offset calculation
authorLucas Stach <l.stach@pengutronix.de>
Mon, 3 May 2021 10:24:22 +0000 (12:24 +0200)
committerLucas Stach <l.stach@pengutronix.de>
Mon, 3 May 2021 14:14:40 +0000 (16:14 +0200)
commit5c971c460983097d86bd29e8359ad8bfa5ba9115
treed2906b7425c93d31c13358fa7f92486b43731294
parent42f93355fd31a605fbc5ed7e45c010c6a8f0f7a2
drm/etnaviv: rework linear window offset calculation

The current calculation based on the required_dma mask can be significantly
off, so that the linear window only overlaps a small part of the DRAM
address space. This can lead to the command buffer being unmappable, which
is obviously bad.

Rework the linear window offset calculation to be based on the command buffer
physical address, making sure that the command buffer is always mappable.

Tested-by: Primoz Fiser <primoz.fiser@norik.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
drivers/gpu/drm/etnaviv/etnaviv_gpu.c