summaryrefslogtreecommitdiffstats
path: root/drivers/video
Commit message (Collapse)AuthorAge
* gpu-paging: Functions to support initial working versionrtss22-aegpu-pagingJoshua Bakita2022-05-24
| | | | | | - Buffer deallocation (+IOCTL) - Buffer reallocation - Private dmabuf user list and accessor
* video: tegra: nvmap: Fix race between write and freeAshish Mhetre2022-01-11
| | | | | | | | | | | | | | | | | | | | | | When NvRmMemWrite() and NvRmMemFree() are called simultaneously on same handle then it could lead to race where dmabuf freed from NvRmMemFree() call could get used by nvmap_get_cachebility() and cause kernel crash. When dmabuf is freed, its exported functions such as get_drvdata() won't be valid anymore and will give error value or NULL. Fix this by checking if get_drvdata() returns error value or NULL and act accordingly. Bug 3457360 Change-Id: Ibcd238bfde8775347a9f8c6266ed3ab3825d945d Signed-off-by: Ashish Mhetre <amhetre@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2651952 Reviewed-by: Ketan Patil <ketanp@nvidia.com> Reviewed-by: Puneet Saxena <puneets@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* tegra: hdcp: update policy init valueAhung Cheng2022-01-07
| | | | | | | | | | | | | | | Update hdcp policy init value based on availability of HDCP TA for L4T Bug 3167119 Change-Id: I81e4f02b20214fb23c94756804448fa0ae80246b Signed-off-by: Ahung Cheng <ahcheng@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2632879 Reviewed-by: Ilhan Gurel <igurel@nvidia.com> Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
* video: tegra: fb: Set default fb state to RUNNING for DSI onlyWayne Wang (SW-TEGRA)2022-01-03
| | | | | | | | | | | | | | | | | | | | Since tegra dsi driver will not call tegra_fb_update_monspecs, the default fb_info->info->state is always FBINFO_STATE_SUSPENDED. Under such situation, fbconsole will not be enabled and affect some usecases. Thus, set default fb state to FBINFO_STATE_RUNNING for DSI case only. Bug 200515788 Change-Id: Ie6336b54aa804f7cf42d3b3dcf209d8e28dcb36c Signed-off-by: Wayne Wang(SW-TEGRA) <waywang@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2645581 GVS: Gerrit_Virtual_Submit Reviewed-by: Naveen Kumar S <nkumars@nvidia.com> Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* video: tegra: host: fix tsec_hdcp syncpoint stuckAhung Cheng2021-11-29
| | | | | | | | | | | | | | | Add lock to prevent channel being freed while executing method Bug 200692849 Change-Id: Ic567b1c43d924234a962e662df954593ee14659b Signed-off-by: Ahung Cheng <ahcheng@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2628743 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* tegra-vic: Make pdata->falcon_data NULL.Achal Verma2021-10-06
| | | | | | | | | | | | | | | | | | | | | | | | | | In case firmware load failed 15340000.vic for whatever reason, we need to reassign pdata->falcon_data NULL else based on check if (pdata->falcon_data), non NULL , code will assume that firmware is loaded properly last time and will go ahead submitting the job, which may result in SMMU-fault. We need that when it tries next time it sees pdata->falcon_data is NULL and does allocation and firmware loading before job submission, Bug 200764796 Change-Id: Ia949ceb19b6b07db94b8a310a6c00363f8e58a6d Signed-off-by: Achal Verma <achalv@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2598619 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Dmitry Pervushin <dpervushin@nvidia.com> Reviewed-by: Amrita Deshmukh <amritad@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2606002 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: Phoenix Jung <pjung@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
* video: tegra: dc: Register AUX channels as i2c busWayne Wang (SW-TEGRA)2021-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add an i2c-over-AUX i2c adapter to tegra_dc_dp. With this i2c adapter, end-user shall be able to send MCCS commands to monitor with ddc/ci tool. Also,since it needs to use I2CWR for i2c-dpaux transactions but not MOTWR, add below changes: * Add two wrapper functions: tegra_dc_dp_edid_i2c_xfer and tegra_dc_dp_ddc_i2c_xfer * Make tegra_dc_dp_i2c_xfer as a helper function: Take different write cmd coming from above 2 wrapper functions. Bug 200740788 Change-Id: Ibaca75a239d76c2356c9f95241e38aa0af0e070f Signed-off-by: Wayne Wang(SW-TEGRA) <waywang@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2601080 Reviewed-by: Shu Zhong <shuz@nvidia.com> Reviewed-by: Ujwal Patel <ujwalp@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* dc: check user-supplied arguments before usedmitry pervushin2021-09-23
| | | | | | | | | | | | | | | | | CID 27937 Bug 200741055 Change-Id: I3aaf094bf616f9cc56accece0f1818b9b6ba7c8a Signed-off-by: dmitry pervushin <dpervushin@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2592115 Reviewed-by: Rahul Jain (SW-TEGRA) <rahuljain@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2592167 Tested-by: Achal Verma <achalv@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: Achal Verma <achalv@nvidia.com> Reviewed-by: Phoenix Jung <pjung@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
* tegra-vhost: Check ptr for NULL before accessing.Achal Verma2021-09-14
| | | | | | | | | | | | | | | | This fix coverity issue: 18628 Bug 200741055 Change-Id: Icbf2a7ad85dd055ac1904a7e9a82b60557c8d447 Signed-off-by: Achal Verma <achalv@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2593221 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Dmitry Pervushin <dpervushin@nvidia.com> Reviewed-by: Rahul Jain (SW-TEGRA) <rahuljain@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* nvhost: Fix comparison of unsigned against >= 0.Achal Verma2021-08-24
| | | | | | | | | | | | | | | | | | | This fixes coverity issue: 3116774 Bug 200741055 Change-Id: I512d3cadc5c4312cf8885acd7b3c9d9b9a00d8b8 Signed-off-by: Achal Verma <achalv@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2528357 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Dmitry Pervushin <dpervushin@nvidia.com> Reviewed-by: Rahul Jain (SW-TEGRA) <rahuljain@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2575306 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Phoenix Jung <pjung@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* dla: kmd: Reflect updates to dla_os_interface.hAnup Mahindre2021-08-16
| | | | | | | | | | | | | | | | | | | | - dla_os_interface in FW was updated to switch to enums - Reflect this update in this copy of the file Jira DLA-3750 JIRA DLA-4908 Bug 3352716 Change-Id: I9132f689fb82a6a89cc88e96033c486023e11a3a Signed-off-by: Anup Mahindre <amahindre@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2559410 (cherry picked from commit cdf7e2222915203bddfbdfd19dc944bb42cffad9) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2572194 Tested-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
* nvdla: kmd: Expose full set of limits for task parametersAnup Mahindre2021-08-16
| | | | | | | | | | | | | | | | | | | | | - Certain task parameter limits were not exposed to UMD / Users - Expose these limits and rename to provide consistent KMD interface across linux / qnx Jira DLA-4467 JIRA DLA-4908 Bug 3352716 Change-Id: Ibcf1de5f4d442d9b1f3fefaf71195bc6e58fff5c Signed-off-by: Anup Mahindre <amahindre@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2558254 (cherry picked from commit ccb23fdbb6da2908893cfebcdcd0d219f9b255e0) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2572193 Tested-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
* nvdla: kmd: add support for stride signal actionArvind M2021-08-16
| | | | | | | | | | | | | | | | | | | | NVDEV_FENCE_SIGNAL_STRIDE fence action translates to ACTION_INCREMENT_SEM firmware action. Jira DLA-4445 JIRA DLA-4908 Bug 3352716 Change-Id: Idb537ea784614d031f66c570359dbc7dd74374af Signed-off-by: Arvind M <am@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2548309 (cherry picked from commit 55093de292c83d787ee3cb5d74bcb1c89a65e8fc) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2572192 Tested-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
* nvdla: kmd: add bypass exec support with submitArvind M2021-08-16
| | | | | | | | | | | | | | | | | | | | | | | | | [1] NVDLA_SUBMIT_FLAGS_BYPASS_EXEC flag allows its clients (UMD or nvdla_kmd_sanity) to bypass execution for a submission. This flag is a property of submission and shall directly apply on all tasks within that submit. [2] With above flag set, it propagates information to firmware through task descriptor and firmware shall be responsible for bypassing the execution. Jira DLA-4443 JIRA DLA-4908 Bug 3352716 Change-Id: I70000ef486905c812fec65f265a378a99844c10a Signed-off-by: Arvind M <am@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2544802 (cherry picked from commit 72da3fde9aa1624722359573d37ec6e73017ca98) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2572191 Tested-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
* video: tegra: host: nvdla: Add support for internal buffersAnup Mahindre2021-08-16
| | | | | | | | | | | | | | | | | | | | | | | - Add buffer type field to nvdla_mem_handle - For internal buffers, skip pin and unpin operations and pass the offset as final adress - Also update error handling in nvdla_map_task_memory to match with convention Jira DLA-4376 JIRA DLA-4908 Bug 3352716 Change-Id: I662da30cb9c606d2f67b792f09e026af391c89d1 Signed-off-by: Anup Mahindre <amahindre@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2503708 (cherry picked from commit a2cc66a3f318394e65f6f126bbb7eaa5ccdae3e2) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2572190 Tested-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
* video: tegra: host: nvdla: Update KMD-FW handshake mechanismAnup Mahindre2021-08-16
| | | | | | | | | | | | | | | | | | | | Update handshake mechanism to signal interuppt handling complete which avoids race condition. Jira DLA-4201 JIRA DLA-4908 Bug 3352716 Change-Id: I23e24a0c9b95a413e4600e24444244498cc8c414 Signed-off-by: Anup Mahindre <amahindre@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2468166 (cherry picked from commit 0f5e5d6c46cd8160425f4375cec57004a07d81c5) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2572187 Tested-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
* tegra-dc: Check ptr against NULL before access.Achal Verma2021-08-13
| | | | | | | | | | | | | | | | | | | This fix coverity issue: 2907007 Bug 200741055 Change-Id: Ib79759e5b2dc83bdf77e659a30a0d9f891e2a899 Signed-off-by: Achal Verma <achalv@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2528297 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Dmitry Pervushin <dpervushin@nvidia.com> Reviewed-by: Rahul Jain (SW-TEGRA) <rahuljain@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2575322 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Phoenix Jung <pjung@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
* nvhost: Fix potential NULL ptr dereference.Achal Verma2021-08-12
| | | | | | | | | | | | | | | | | | | | This fixes coverity issue: 3230656 Bug 200741055 Change-Id: I228bee9729e91d670a7e130cb6c766ff151002cd Signed-off-by: Achal Verma <achalv@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2528406 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Dmitry Pervushin <dpervushin@nvidia.com> Reviewed-by: Rahul Jain (SW-TEGRA) <rahuljain@nvidia.com> GVS: Gerrit_Virtual_Submit (cherry picked from commit 4112f673abff584080febc1e9f613618aa22fa1d) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2574540 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Phoenix Jung <pjung@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* video: tegra: host: LS fw gets priority in get fwAnkit Patel2021-08-02
| | | | | | | | | | | | | | | | Whenever NVDEC LS firmware pack for the soc, It will give priority to LS FW rather than NS FW. If in case of absence of LS FW It will load NS FW. Bug 200415909 Bug 200704321 Signed-off-by: Ankit Patel <anpatel@nvidia.com> Change-Id: I15f53f33d4735c25b972e1e8a394d01047f86bde Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2375549 Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2511966 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
* video: dc: initialize few data structures with 0prafulls2021-07-30
| | | | | | | | | | | | | | | | | Few data structures are not initialized and then copied to user-space causing data leak. It is identified as security threat. Fix those variables by initializing to 0. bug 3299009 Change-Id: I368556a0f68a7939b9800438d308aa1eab171c8d Signed-off-by: prafulls <prafulls@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2567633 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Ujwal Patel <ujwalp@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
* tegra: nvmap: fix possible race due to use after free handlePuneet Saxena2021-07-23
| | | | | | | | | | | | | | | | | | | | | | | | | When there is race between operation on nvmap handle and freeing the nvmap handle, operation is performed on already freed handle. Add check for nvmap handle is not freed before doing operation on nvmap handle. Bug 200719216 Bug 3285456 Bug 200724773 Change-Id: Ib265760e4e529e743621b98e198e0fa7d2e4cd57 Signed-off-by: Puneet Saxena <puneets@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2518260 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2563880 Tested-by: Thomas Steinle <tsteinle@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: Thomas Steinle <tsteinle@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Phoenix Jung <pjung@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
* tegra: nvmap: return kernel VA as NULL for RO mapped bufferPuneet Saxena2021-07-13
| | | | | | | | | | | | | | | | | | | | | | | A buffer is mapped in user space as ReadOnly. It is passed to NvMap client. The client to map attached dma_buf in kernel address space. Return NULL virtual address for this kind of mapping requested for ex from dma_buf_kmap/ dma_buf_vmap. Bug 3298659 Change-Id: I42e651da79862f57f47baf046457ac112c75a9b9 Signed-off-by: Puneet Saxena <puneets@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2523913 (cherry picked from commit 1f45950993afac4daf91bc00e07a6c4705d22773) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2526501 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: Amulya Yarlagadda <ayarlagadda@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* tegra: nvmap: Address few inappropriate mixes of integer typesMartin Radev2021-07-09
| | | | | | | | | | | | | | | | | | | | | | | There are possible value truncations when mixing types of different width, e.g. s32 (int), u32, u64. This patch attempts to address such issues in two ways: 1) Manually find and fix error-prone mixing. 2) Prevent creating a handle from an exuberantly large size. The maximum selected size is set to maximum of system memory. This is expected to be small enough that the number of pages fits even in s32. This should offer some future protection in case nvmap starts mixing int and u64 again. Bug 3315168 Change-Id: Icb83d745a7b1955ec473bec46f12a3ae25ad73af Signed-off-by: Martin Radev <mradev@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2537851 (cherry picked from commit 5fa42e9d5f73a937995f87ba28b99d3b891d8f3a) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2547360 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
* tegra: nvmap: replace BUG_ON by WARN_ONPuneet Saxena2021-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | During per page cache_maint operation if Junk userspace VA passed which doesn't have page mapping created in kernel, __ioremap of the pages results NULL kernel VA. "nvmap_cache_maint_phys_range" returns -ENOMEM / No memory error for the page range. Per page heap cache-maint triggers BUG_ON when error is received. Here BUG_ON is unwarranted as it doesn't break system functionality. Rather only stale data will be received in user space as part of the faulty cache-maint operation. Replace it by WARN_ON to indicate cache-maint on page range is failed. Bug 3298659 Signed-off-by: Puneet Saxena <puneets@nvidia.com> Change-Id: Ia69015e6bd9b3ab0a2bf7b416282ae3f53a4393b Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2527259 (cherry picked from commit 931227cd092f9948a2b86de22f8ee089d7128a97) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2545460 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: Amulya Yarlagadda <ayarlagadda@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* camera: convert isobw in mbps for ptsa updateKen Chang2021-06-02
| | | | | | | | | | | | | | | | | Convert the iso bandwidth requested by camera from kbps to mbps to avoid overflow in ptsa calcuation. Bug 3301203 Change-Id: I6e6f3d90a71105847db820e3ae32a5c36feae190 Signed-off-by: Ken Chang <kenc@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2536222 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
* video: tegra: avoid resetting hub clk rateNaveen Kumar S2021-05-20
| | | | | | | | | | | | | | | | | | | | | | | FMON framework expects nvdisplayhub clock rate to not go below 18.75Mhz. But while disabling head, nvdisplayhub clock is set to 0Hz as part of clearing bandwidth allocations. This causes FMON errors as the rate is lower than minimum rate. Since it is not necessary to reset hub clock rate when disabling the clock, retain existing rate instead of setting it to 0Hz. bug 200722700 Change-Id: Ia63f24ff5d27b94d2bf342d49bfbcd34198131bd Signed-off-by: Naveen Kumar S <nkumars@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2529090 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Shu Zhong <shuz@nvidia.com> Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
* drivers: video: tegra: nvmap: fix Write on Read Only BufferPuneet Saxena2021-05-10
| | | | | | | | | | | | | | | | | | | | NvMap allows write on Read Only user buffer. Check the condition if buffer is RO and Write requested, return error. Bug 3285456 Change-Id: Ic051a68c962173e59fb122706247b1293a4d4148 Signed-off-by: Puneet Saxena <puneets@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2517798 (cherry picked from commit 15849aca2fbc7907b3dea3d9509db61e6468e37a) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2521316 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: Amulya Yarlagadda <ayarlagadda@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
* video: tegra: nvmap: export dma_buf as RO when NVMAP_HANDLE_RO is setSagar Kamble2021-05-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following kernel BUG is encountered when closing the file whose mode is overridden to RO throgh fmode field as inode->i_readcount is not initialized for the file. This is seen when running the test NvRmGpuTest_Channel_SimplestPb_RoMappedBuffer_From_CPUVA on K5.9. The correct way to set the file mode as RO is to export the dma_buf as RO that will initialize inode->i_readcount properly. [ 1228.027800] kernel BUG at kernel/kernel-5.9/include/linux/fs.h:2842! [ 1228.035330] Internal error: Oops - BUG: 0 [#3] PREEMPT SMP [ 1228.115034] Hardware name: Jetson-AGX (DT) [ 1228.119234] pstate: 60400009 (nZCv daif +PAN -UAO BTYPE=--) [ 1228.125023] pc : __fput+0x22c/0x230 [ 1228.128690] lr : __fput+0xa4/0x230 [ 1228.216800] Call trace: [ 1228.219258] __fput+0x22c/0x230 [ 1228.222407] ____fput+0x20/0x30 [ 1228.225388] task_work_run+0x88/0x140 [ 1228.228886] do_notify_resume+0x204/0x868 [ 1228.233080] work_pending+0x8/0x204 [ 1228.236583] Code: 17ffff8e aa1703e0 9400b26f 17ffffa6 (d4210000) [ 1228.242702] ---[ end trace af706a6663eb46e5 ]--- [ 1228.247252] note: nvrm_gpu_tests[1156] exited with preempt_count 1 Bug 200660013 Change-Id: Ie238f59a46aa7b016249a01e39e7bbd73ecfab02 Signed-off-by: Sagar Kamble <skamble@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2515024 (cherry picked from commit 891dc46b2e85424fc81544a83d6752eb1ea57dae) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2521315 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Puneet Saxena <puneets@nvidia.com> Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: Amulya Yarlagadda <ayarlagadda@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
* video: tegra: nvmap: add support to create RO handle from user VAPuneet Saxena2021-05-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | User malloc + mprotect/mmap a buffer as RO and as part of alloc_from_va, user pass the ACCESS_FLAGS as RO and expects NvMap to give dma_buf_fd with RO access. Below are the conditions result in NvRmMemHandle creation - 1) VA: RO and Attr: RW - Don't create NvMap Handle 2) VA: RO and Attr: RO - Create NvMap Handle and set dma_buf_fd as RO 3) VA: RW and Attr: RO - Create NvMap Handle and set dma_buf_fd as RO 4) Mixed VA: RO + RW and Attr: RO - Create NvMap Handle with dma_buf_fd as RO for the whole buffer 5) Mixed VA: RO + RW and Attr: RW - Don't Create NvMap Handle If few pages of the buffer is set as RO and rest as RW, multiple vma are created and vma->end and vma->start doesn't differ by the buffer size, passed to create handle from VA. Hence remove the check. Anyway the check is done in get_user_pages. The change sets dma_buf_fd as RW/RO so that other process should fetch the access permission just by reading f_mode of dma_buf_fd. Bug 200621238 Bug 200634660 Change-Id: I9c50c6f28664f0ff9f70dc08b15d93389e7d7201 Signed-off-by: Puneet Saxena <puneets@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2515023 (cherry picked from commit 0514e68ce8948428b417c55057a4dd2f57acd9c2) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2521313 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: Amulya Yarlagadda <ayarlagadda@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
* video: tegra: nvmap: Support gup for read only bufferKetan Patil2021-05-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | nvmap used to pass FOLL_WRITE flag every time, while calling pinning the buffer by calling kernel's get_user_pages, irrespective of the buffer is read-only or read-write. Check whether the vaddr corresponds to a writable page or not. Pass the flag FOLL_WRITE only in case of writable buffer. Add a new flag indicating read only handle. When any mapping request arrives, check if mapping request is RW and the handle is RO. In such case, fail the mapping request. Bug 200621238 Change-Id: I9b7074faaed64b01404e0410a9e2d2ffa65d6d90 Signed-off-by: Ketan Patil <ketanp@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2515022 (cherry picked from commit ed3527562ede71061d6b19bc0b25e1b288071ad2) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2521311 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Puneet Saxena <puneets@nvidia.com> Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: Amulya Yarlagadda <ayarlagadda@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
* drivers: use overlay instead of relative pathAnkit Patel2021-05-04
| | | | | | | | | | | | | | | | | | Modified misc/tegra-cec and video/tegra/dc NVIDIA git repo Makefile, Now overlay macro will be used instead of relative path from kernel source tree, to find the included header file. Bug 200606454 Signed-off-by: Ankit Patel <anpatel@nvidia.com> Change-Id: I684388e9c81be94915c05db3cdae8b6100c6db91 (cherry picked from commit cc443ca25e19811feb0fba17e4ce7c2b6fcd6962) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2522483 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* video: nvhost: Add vhost NULL-ptr checkThomas Steinle2021-04-23
| | | | | | | | | | Bug 200705410 Change-Id: I5a317390b5ebf247162cc4e3089474c8f36e3e74 Signed-off-by: Thomas Steinle <tsteinle@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2506246 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
* nvdla: kmd: synchronize access to task pool memoryArvind M2021-04-22
| | | | | | | | | | | | | | | | | | | | | | [1] In the absence of synchronization to access task pool, submission may happen at faster rate than cleanups. This shall lead to frequent out-of-memory error. [2] This commit fixes the issues through retries before throwing OOM. a. Sets up a communication between cleanup & submit. b. Retries for allocating task memory - Retry period: 1 ms - Total timeout: 10 ms Bug 200680501 Change-Id: Iea25fbe6e7891938f6318285d4824bc1c54ddb05 Signed-off-by: Arvind M <am@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2518666 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
* nvdla: kmd: cleanup error propagation in submitArvind M2021-04-22
| | | | | | | | | | | | | | | | | | | | [1] Prior to this commit, - Errors during nvdla_fill_preactions/postactions are ignored and continued. - Resources (task memory, references) are not cleaned up leading to resource leak. [3] This commit fixes the issue by handling resource cleanup and errors propagations. Bug 200680501 Change-Id: I34d96d24e669f79cca09e38ba9ecb0ccb0c7d726 Signed-off-by: Arvind M <am@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2518665 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
* video: tegra: host: reuse tsec_hdcp syncptKen Chang2021-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reuse the same syncpt for tsec_hdcp to avoid a new syncpt being requested when the hdcp driver retries the downstream worker due to link integrity check failure. The failed log: [17198.185797] host1x 13e10000.host1x: nvhost_get_syncpt: failed to find free syncpt [17198.193635] ---- syncpts ---- [17198.196605] id 2 (disp_a) min 3063 max 3063 refs 1 (previous client : ) [17198.203229] id 3 (disp_b) min 2 max 2 refs 1 (previous client : ) [17198.209680] id 4 (disp_c) min 2 max 2 refs 1 (previous client : ) [17198.215787] id 5 (disp_d) min 2 max 2 refs 1 (previous client : ) [17198.222078] id 6 (disp_e) min 3062 max 3062 refs 1 (previous client : ) [17198.228706] id 7 (disp_f) min 3 max 3 refs 1 (previous client : ) [17198.234811] id 8 (vblank1) min 1031520 max -2 refs 1 (previous client : ) [17198.241609] id 13 (vblank2) min 1031207 max -4 refs 1 (previous client : ) [17198.248508] id 21 (tsec_hdcp) min 8 max 8 refs 1 (previous client : ) [17198.254957] id 22 (tsec_hdcp) min 8 max 8 refs 1 (previous client : ) [17198.261410] id 23 (gp10b_507) min 8 max 8 refs 1 (previous client : ) [17198.267858] id 25 (gp10b_506) min 22 max 22 refs 1 (previous client : ) [17198.274490] id 28 (tsec_hdcp) min 8 max 8 refs 1 (previous client : ) [17198.280940] id 29 (tsec_hdcp) min 8 max 8 refs 1 (previous client : ) [17198.287390] id 30 (tsec_hdcp) min 8 max 8 refs 1 (previous client : ) [17198.293834] id 31 (tsec_hdcp) min 8 max 8 refs 1 (previous client : ) [17198.300284] id 32 (tsec_hdcp) min 8 max 8 refs 1 (previous client : ) Bug 200719647 Change-Id: I1884ec9e4ec95237794fa0663a5bb1409742ec24 Signed-off-by: Ken Chang <kenc@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2517047 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* drivers: video: Increase IVM_OFFSET_MASK widthThomas Steinle2021-04-12
| | | | | | | | | | | | | | | This change increases maximum IVM size to 512MB. Bug 3255193 Change-Id: I0c55b4fffe1f3ac2cd81522a08dcc66d54742001 Signed-off-by: Thomas Steinle <tsteinle@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2511553 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Phoenix Jung <pjung@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
* nvmap: Change cache_maint initializationThomas Steinle2021-03-30
| | | | | | | | | | | | | | | | | This change simplifies initialization of cache maintenance parameters to prevent a possible race condition. Bug 200688817 Change-Id: Icd8e989eee0711e24164943adaf28c1258ef0879 Signed-off-by: Thomas Steinle <tsteinle@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2487751 (cherry picked from commit 6580d53dd58b499bd81e8e38ffdab20d9213a2d0) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2505592 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: Rohit Upadhyay <rupadhyay@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
* dc:Fix unchecked return value.Achal Verma2021-03-30
| | | | | | | | | | | | | | | | | | | | | | | Check for error returned by gpio_request(). This fix coverity issue : 444059 Bug 200689436 Change-Id: Id2f63293e5991242a6510bd9e7c334fbc4a522ce Signed-off-by: Achal Verma <achalv@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2475939 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Dmitry Pervushin <dpervushin@nvidia.com> Reviewed-by: Rahul Jain (SW-TEGRA) <rahuljain@nvidia.com> Tested-by: Smriti Sharma <smritis@nvidia.com> GVS: Gerrit_Virtual_Submit (cherry picked from commit 4118fd5925c84a9e242df78136f34c5031fd3996) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2499891 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Phoenix Jung <pjung@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* nvdisp: Untrusted value as argumentSmriti Sharma2021-03-30
| | | | | | | | | | | | | | | | | | | | | putting permisible range checks. This fix coverity issue :10075158, 10075159 Bug 200689436 Change-Id: I35f666e52e64532b48aa9ca6981a39d935d70516 Signed-off-by: Smriti Sharma <smritis@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2484026 Reviewed-by: Dmitry Pervushin <dpervushin@nvidia.com> Reviewed-by: Rahul Jain (SW-TEGRA) <rahuljain@nvidia.com> GVS: Gerrit_Virtual_Submit (cherry picked from commit 8fdd289fb81ab5fa2618e55921a0347a4dc5d1ba) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2499888 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Phoenix Jung <pjung@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* dc: hdmi: camera: Deference after null checkSmriti Sharma2021-03-30
| | | | | | | | | | | | | | | | | | | | | Check for NULL pointer of hdmi->edid. This fix coverity issue : 9847768 Bug 200689436 Change-Id: I5f1cc33a9b4c61b471f724da053da72567a91cb6 Signed-off-by: Smriti Sharma <smritis@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2482353 Reviewed-by: Dmitry Pervushin <dpervushin@nvidia.com> Reviewed-by: Rahul Jain (SW-TEGRA) <rahuljain@nvidia.com> GVS: Gerrit_Virtual_Submit (cherry picked from commit 261d2956c5e4c7eea948473d5db48f191fc8d50d) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2499884 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Phoenix Jung <pjung@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* dc: edid: Deference after null checkSmriti Sharma2021-03-30
| | | | | | | | | | | | | | | | | Check for NULL pointer of specs->modedb. This fix coverity issue : 10055743 Bug 200689436 Change-Id: I9511104cfd3053ba99d2f8483500afdbefe72b4d Signed-off-by: Smriti Sharma <smritis@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2482445 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Phoenix Jung <pjung@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
* video: tegra: host: ratelimit print invalid ioctlAchal Verma2021-03-27
| | | | | | | | | | | | | | | | | | | | - Error print when ioctl command is invalid holds the interface for upto 3ms. - When repeated access is made, it could load the CPU unnecessarily. Bug 200704890 Bug 3240772 Bug 200696711 Change-Id: I3b00b1616234fb0182fe3d1588284a7950b7522b Signed-off-by: Achal Verma <achalv@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2500041 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Phoenix Jung <pjung@nvidia.com> Reviewed-by: Hardik T Shah <hardikts@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
* video: tegra: host: ratelimit print invalid ioctlVishruth Jain2021-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | Error print when ioctl command is invalid holds the interface for upto 3ms. When repeated access is made, it can cause display update failure. Change the print to ratelimited. Bug 3240772 Bug 200696711 Change-Id: I44e242574e1f67d38438a87698c37658308a3f5a Signed-off-by: Vishruth Jain <vishruthj@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2480957 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Dmitry Pervushin <dpervushin@nvidia.com> Reviewed-by: Rahul Jain (SW-TEGRA) <rahuljain@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2500040 Tested-by: Achal Verma <achalv@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: Achal Verma <achalv@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Phoenix Jung <pjung@nvidia.com> Reviewed-by: Hardik T Shah <hardikts@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
* tegra: hdcp: fix compliance failed items for TX1Ahung Cheng2021-02-08
| | | | | | | | | | | | | | | | | Enable verify vprime for TX1 in hdcp 1.x as it's part of link integrity check. Bug 200551125 Change-Id: I6de3bc9f7a4e051ae5014f74565bfd798bd302dc Signed-off-by: Ahung Cheng <ahcheng@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2480883 Reviewed-by: Yi Chen Chen <yichenc@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* tegra: hdcp: fix trusty support for repeaterAhung Cheng2021-02-03
| | | | | | | | | | | | | | | | Fix trusty support in link integrity check for hdcp2x repeater Bug 200551125 Change-Id: I304d387d0cd8a84c945debf993b5a84809f9e3c5 Signed-off-by: Ahung Cheng <ahcheng@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2477247 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Yi Chen Chen <yichenc@nvidia.com> Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
* hdmi: fix 'using uninitialized variable'.Achal Verma2021-01-15
| | | | | | | | | | | | | | | | | | | stack variable should be initailized before use. This fix coverity issue : 18093 Bug 200689436 Change-Id: I8e14565c1c92f8d7ce37b11220c5b163a11c0d89 Signed-off-by: Achal Verma <achalv@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2467802 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Phoenix Jung <pjung@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
* nvhost: make sure that user string has NULLAchal Verma2021-01-15
| | | | | | | | | | | | | | | | | instead of memsetting the whole buffer, set the last byte to '\0' This fixes the coverity issues 38940. Bug 200689436 Change-Id: Iee6c3261b49c1531cb5ddbc7994056ac3833b582 Signed-off-by: Achal Verma <achalv@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2467799 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Phoenix Jung <pjung@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
* nvdla: kmd: handle {RELEASE,ALLOC}_QUEUE ioctlsArvind M2021-01-05
| | | | | | | | | | | | | | | | | | | | | | | [1] This commit separates the allocation and deallocation of mission critical resources away from open() and close() [2] It is achieved through introduction of NVDLA_IOCTL_{ALLOC,RELEASE} IOCTLs. [3] nvdla_buffer_* APIs introduced to facilitate easier split. Jira DLA-4175 Bug 3200422 Bug 200628173 Change-Id: I3fb07ecaff69c62ec5eb9e5bea39b07ae1624240 Signed-off-by: Arvind M <am@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2403689 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2412585 GVS: Gerrit_Virtual_Submit Tested-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: Mitch Harwell <mharwell@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
* video: tegra: host: pin with specific permissionArvind M2021-01-05
| | | | | | | | | | | | | | | | | | | | | | [1] Facilitate pinning of buffer with user requested access permission [2] This feature allows to restrict access to buffers shared with the device. Jira DLA-2502 Jira DLA-4175 Bug 3200422 Change-Id: I175ad10922480689de57eb832040a7d59b29b9bd Signed-off-by: Arvind M <am@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2209415 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2412573 GVS: Gerrit_Virtual_Submit Tested-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: Mitch Harwell <mharwell@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
* video: tegra: host: nvdla: add DLA fw version checkShridhar Rasal2021-01-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | - update DLA1 FW version for multichip support - For firmware verification with multi-chip support, - Need to get way to distinuguish chip. - Use tegra_get_chip_id() is not recommended practice - Alternately, using nvhost_device_data's "version" param which distinguishes chip specific data at compile time - So encode fw version into "version" param - include firmware version header to encode - Inline function can't be used at compile to encode "version" param through macro Jira DLA-3182 Jira DLA-4175 Bug 3200422 Change-Id: Id958133739acba583690b9fdf440fa1729b2b51e Signed-off-by: Shridhar Rasal <srasal@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2412579 GVS: Gerrit_Virtual_Submit Tested-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: Mitch Harwell <mharwell@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>