Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: vivid: fix incorrect PA assignment to HDMI outputs

The initial physical address was one too low for the outputs.
E.g. if 1.0.0.0 was expected, then it was set to 0.0.0.0, and
2.0.0.0 became 1.0.0.0.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: Johan Korsnes <johan.korsnes@gmail.com>
Fixes: 4ee895e71abb ("media: vivid: reorder CEC allocation and control set-up")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
2d772da9 9a43ccb5

+2 -2
+2 -2
drivers/media/platform/vivid/vivid-core.c
··· 1571 1571 } 1572 1572 v4l2_info(&dev->v4l2_dev, "CEC adapter %s registered for HDMI output %d\n", 1573 1573 dev_name(&dev->cec_tx_adap[i]->devnode.dev), i); 1574 - if (i <= out_type_counter[HDMI]) 1575 - cec_s_phys_addr(dev->cec_tx_adap[i], i << 12, false); 1574 + if (i < out_type_counter[HDMI]) 1575 + cec_s_phys_addr(dev->cec_tx_adap[i], (i + 1) << 12, false); 1576 1576 else 1577 1577 cec_s_phys_addr(dev->cec_tx_adap[i], 0x1000, false); 1578 1578 }