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>
This version update involves a lot of content, so the previous version
has been deleted and the new version has been re-merged into the kernel.
The configuration file for the GPU driver originates from a previous
version.
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>