mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
gpu: host1x: Select context device based on attached IOMMU
On Tegra234, engines that are programmed through Host1x channels can be attached to either the NISO0 or NISO1 SMMU. Because of that, when selecting a context device to use with an engine, we need to select one that is also attached to the same SMMU. Add a parameter to host1x_memory_context_alloc to specify which device we are allocating a context for, and use it to pick an appropriate context device. Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Change-Id: I32af312c85164b72c14409d816d3b50ad5c7bfe5 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2811836 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Laxman Dewangan
parent
93006031b9
commit
e1b1afaab1
@@ -116,7 +116,7 @@ int tegra_drm_ioctl_channel_open(struct drm_device *drm, void *data, struct drm_
|
|||||||
|
|
||||||
if (supported)
|
if (supported)
|
||||||
context->memory_context = host1x_memory_context_alloc(
|
context->memory_context = host1x_memory_context_alloc(
|
||||||
host, get_task_pid(current, PIDTYPE_TGID));
|
host, client->base.dev, get_task_pid(current, PIDTYPE_TGID));
|
||||||
|
|
||||||
if (IS_ERR(context->memory_context)) {
|
if (IS_ERR(context->memory_context)) {
|
||||||
if (PTR_ERR(context->memory_context) != -EOPNOTSUPP) {
|
if (PTR_ERR(context->memory_context) != -EOPNOTSUPP) {
|
||||||
|
|||||||
Reference in New Issue
Block a user