mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
drm/tegra: Update device-tree property for NVDEC
The device-tree property for identifying the NVDEC instance has been updated and so update the NVDEC driver to align with upstream. JIRA LS-96 Change-Id: I7bcb074601049a3ac81c0069a865c467008a7846 Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2602720 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit (cherry picked from commit 81fcabc1c77c79a345a443e99aadf279d1fb6586) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2615189 Reviewed-by: David Ung <davidu@nvidia.com> Tested-by: David Ung <davidu@nvidia.com>
This commit is contained in:
committed by
Laxman Dewangan
parent
254980dab4
commit
f1ec6fabaf
@@ -348,7 +348,7 @@ static int nvdec_probe(struct platform_device *pdev)
|
||||
struct device *dev = &pdev->dev;
|
||||
struct host1x_syncpt **syncpts;
|
||||
struct nvdec *nvdec;
|
||||
u32 instance;
|
||||
u32 host_class;
|
||||
int err;
|
||||
|
||||
/* inherit DMA mask from host1x parent */
|
||||
@@ -378,12 +378,16 @@ static int nvdec_probe(struct platform_device *pdev)
|
||||
return PTR_ERR(nvdec->clk);
|
||||
}
|
||||
|
||||
err = of_property_read_u32(dev->of_node, "nvidia,instance", &instance);
|
||||
if (err < 0)
|
||||
instance = 0;
|
||||
err = clk_set_rate(nvdec->clk, ULONG_MAX);
|
||||
if (err < 0) {
|
||||
dev_err(&pdev->dev, "failed to set clock rate\n");
|
||||
return err;
|
||||
}
|
||||
|
||||
if (instance >= nvdec->config->num_instances)
|
||||
return -EINVAL;
|
||||
err = of_property_read_u32(dev->of_node, "nvidia,host1x-class",
|
||||
&host_class);
|
||||
if (err < 0)
|
||||
host_class = HOST1X_CLASS_NVDEC;
|
||||
|
||||
nvdec->falcon.dev = dev;
|
||||
nvdec->falcon.regs = nvdec->regs;
|
||||
@@ -397,10 +401,7 @@ static int nvdec_probe(struct platform_device *pdev)
|
||||
INIT_LIST_HEAD(&nvdec->client.base.list);
|
||||
nvdec->client.base.ops = &nvdec_client_ops;
|
||||
nvdec->client.base.dev = dev;
|
||||
if (instance == 0)
|
||||
nvdec->client.base.class = HOST1X_CLASS_NVDEC;
|
||||
else
|
||||
nvdec->client.base.class = HOST1X_CLASS_NVDEC1;
|
||||
nvdec->client.base.class = host_class;
|
||||
nvdec->client.base.syncpts = syncpts;
|
||||
nvdec->client.base.num_syncpts = 1;
|
||||
nvdec->dev = dev;
|
||||
|
||||
Reference in New Issue
Block a user