summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
Commit message (Collapse)AuthorAge
* tegra-udrm : Fix kmem leakjbajaj2021-03-31
| | | | | | | | | | | | | | | | | | release reference to eventfd context Bug 200708315 Bug 200707615 Change-Id: I9fed2be75a73589916a38636cd001ec5f46a6fd3 Signed-off-by: Jay Bajaj <jbajaj@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2505524 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: Youngjin Kim <nkim@nvidia.com> Reviewed-by: Phoenix Jung <pjung@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
* drm: tegra-drm: add tegra_udrm_postcloseAlvin Park2020-12-16
| | | | | | | | | | | | | | | | | To free file->driver_priv which was allocated by tegra_udrm_open, added tegra_udrm_postclose. Bug 3197534 Change-Id: I88608aa50d7fb73a6ed699ac4deef7b87e169de9 Signed-off-by: Alvin Park <apark@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2459899 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: Hardik T Shah <hardikts@nvidia.com> Reviewed-by: Jay Kumar Bajaj <jbajaj@nvidia.com> Reviewed-by: Phoenix Jung <pjung@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
* drm: tegra_udrm: release eventfd context after signalling userspaceOle Bjørn Midtbø2020-11-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix crash due to use-after-free. [ 72.483066] BUG: spinlock bad magic on CPU#4, video/1371 [ 72.488377] lock: 0xffffffc19b43bc88, .magic: ffffffc1, .owner: /-541618416, .owner_cpu: 384 [ 72.496886] CPU: 4 PID: 1371 Comm: video Tainted: G O 4.9.241+ #24 [ 72.504180] Hardware name: barents (DT) [ 72.508008] Call trace: [ 72.510453] [<ffffff800808aca8>] dump_backtrace+0x0/0x1c8 [ 72.515842] [<ffffff800808ae94>] show_stack+0x24/0x30 [ 72.520885] [<ffffff80084ee1d8>] dump_stack+0xc4/0xfc [ 72.525928] [<ffffff80081dde0c>] spin_dump+0x94/0xa4 [ 72.530883] [<ffffff80081234f8>] do_raw_spin_lock+0xc8/0x108 [ 72.536532] [<ffffff8008efb37c>] _raw_spin_lock_irqsave+0x5c/0x70 [ 72.542613] [<ffffff80082d9cc0>] eventfd_signal+0x30/0x90 [ 72.548001] [<ffffff80088738cc>] tegra_udrm_preclose+0x94/0xd8 [ 72.553822] [<ffffff800884fc58>] drm_release+0xa0/0x2f0 [ 72.559037] [<ffffff8008278398>] __fput+0xb0/0x230 [ 72.563817] [<ffffff8008278590>] ____fput+0x20/0x30 [ 72.568686] [<ffffff80080d3358>] task_work_run+0xd0/0x100 [ 72.574074] [<ffffff80080b083c>] do_exit+0x384/0xbb8 [ 72.579027] [<ffffff80080b10fc>] do_group_exit+0x3c/0xa0 [ 72.584328] [<ffffff80080c0488>] get_signal+0x128/0xba8 [ 72.589542] [<ffffff800808a138>] do_signal+0x80/0x1c0 [ 72.594583] [<ffffff800808a410>] do_notify_resume+0xa8/0xc0 [ 72.600143] [<ffffff8008083258>] work_pending+0x8/0x14 Bug 3174256 Change-Id: If502fc3035f53a5ad776acf1dbc7c21046a41b2a Signed-off-by: Ken Chang <kenc@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2444208 Reviewed-by: automaticguardword <automaticguardword@nvidia.com> Reviewed-by: Yogish Kulkarni <yogishk@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
* tegra_udrm: add SEND_CONNECTOR_STATUS_EVENT ioctlYogish Kulkarni2019-12-23
| | | | | | | | | | | | | | | | | | | Add DRM_TEGRA_UDRM_SEND_CONNECTOR_STATUS_EVENT ioctl to generate a uevent for connector status property change. user space calls this ioctl with connector id and property id related to the status change. Bug 200577678 Change-Id: I079a7ebbc2c11ad6e6c7003df6eab57817161e26 Signed-off-by: Yogish Kulkarni <yogishk@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2266101 GVS: Gerrit_Virtual_Submit Reviewed-by: Sai Kiran K <skirank@nvidia.com> Tested-by: Sai Kiran K <skirank@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>
* DRM: tegra_udrm: support dual hdmi hotplugJeremy Ho2019-10-22
| | | | | | | | | | | | | | | Bug 200549422 Change-Id: I0c073509e097db6de8706fb59bd67ec2e92fe4d4 Signed-off-by: Jeremy Ho <jeremyh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2209472 Reviewed-by: Ken Chang <kenc@nvidia.com> Reviewed-by: Yogish Kulkarni <yogishk@nvidia.com> Reviewed-by: Naveen Kumar S <nkumars@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* DRM: tegra_udrm: support DSI hotplugKen Chang2019-09-23
| | | | | | | | | | | | | | | | | | | | Send DRM HOTPLUG uevent for disp_extcon DSI, which has cable id EXTCON_DISP_DSIHPD, connection state. Bug 200547709 Change-Id: If118aa6a5fdbb362912b58d3c6f6be608815d46a Signed-off-by: Ken Chang <kenc@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2191397 Reviewed-by: Shu Zhong <shuz@nvidia.com> Reviewed-by: Yogish Kulkarni <yogishk@nvidia.com> Reviewed-by: Naveen Kumar S <nkumars@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Santosh Galma <galmar@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* DRM: tegra_udrm: correct error checkingYogish Kulkarni2019-08-23
| | | | | | | | | | | | | | | | | | | | | | | devm_extcon_register_notifier() returns 0 if success or negaive error number if failure. extcon_get_extcon_dev() returns the pointer of extcon device if success. It returns NULL or ERR_PTR(err) on failure. disp-state device name on older platforms is "extcon:disp-state", so try that if "external-connection:disp-state" fails. Bug 200515973 Change-Id: Ic05e52e63513cd4c556300856bccc3e1db81934e Signed-off-by: Yogish Kulkarni <yogishk@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2175018 (cherry picked from commit 6637d613b8502e9faa2c57b7b15a4419b42ca8f6) Reviewed-on: https://git-master.nvidia.com/r/2176788 Reviewed-by: Ujwal Patel <ujwalp@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* DRM: tegra_udrm: Send HOTPLUG ueventYogish Kulkarni2019-07-05
| | | | | | | | | | | | | | | | | | Listen for HDMI and DP cable state change events on extcon device "external-connection:disp-state". Upon cable state change event, generate DRM HOTPLUG uevent. Bug 200515973 Change-Id: If0eb1212a409a7846ea42ca04ead32ef65da3aa8 Reviewed-on: https://git-master.nvidia.com/r/2142400 (cherry picked from commit 948799eb5d912cd71b403bb1c1466ca178c770ea) Signed-off-by: Yogish Kulkarni <yogishk@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2148040 GVS: Gerrit_Virtual_Submit Reviewed-by: Ujwal Patel <ujwalp@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* DRM: tegra_udrm: Notify userspace about set masterYogish Kulkarni2019-02-06
| | | | | | | | | | | | | | | | | | | | | Add DRM_TEGRA_UDRM_SET_MASTER_NOTIFY ioctl. In this ioctl acquire reference to the internal eventfd context associated with eventfd passed by user space. Signal this eventfd from driver's master_set method. Bug 200479257 Bug 200473544 Bug 2158091 Change-Id: I3b3518a5f33e948e5fafb829768692a0c8379fba Reviewed-on: https://git-master.nvidia.com/r/#/c/2006490/ Signed-off-by: Yogish Kulkarni <yogishk@nvidia.com> (cherry picked from commit 22603e26d309d694184deeccb52ca52326b4d7bd) Reviewed-on: https://git-master.nvidia.com/r/2012016 GVS: Gerrit_Virtual_Submit Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* DRM: tegra_udrm: Don't set DRM_AUTH flagYogish Kulkarni2019-02-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | After login to Ubuntu Wayland desktop, if user tries to launch application which opens DRM device and calls e.g drmGetVersion it fails as drmGetVersion call handling in UMD will create drm_nvdc context and starts a thread to listen for close, set/drop master notifications from driver. It uses tegra_udrm_close_notify_ioctl and tegra_udrm_drop_master_notify_ioctl to register for notifications from KMD. So if DRM_AUTH is set for those ioctls they might fail if there is existing master, so don't set DRM_AUTH on those ioctls. None of the tegra_udrm ioctls are modifying KMS state so DRM_AUTH is not required anyway. Bug 200489906 Bug 2158091 Change-Id: I94ea328f43bae544e3ade7967a293351d036901a Signed-off-by: Yogish Kulkarni <yogishk@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2007459 (cherry picked from commit 1f64b4a583b3ac2df07102a602e369eca814c247) Reviewed-on: https://git-master.nvidia.com/r/2009523 GVS: Gerrit_Virtual_Submit Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* DRM: tegra_udrm: Register DRM render nodeYogish Kulkarni2019-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | EGL searches renderDXXX device nodes in "/dev/dri/". On each node found it calls drmGetVersion() to check if version name is tegra-udrm. If name matches, it calculates primary index X corresponding to XXX. Primary index is used to create device file name "/dev/dri/cardX". When application calls eglQueryDeviceStringEXT() with <name> set to EGL_DRM_DEVICE_FILE_EXT, EGL returns the created device file name. EGL when searching for the correct DRM device, only look at render nodes, to avoid tripping on DRM mastership. Bug 200483905 Bug 200473544 Change-Id: I1cb9a7173b078eec901bec2786dcca1a6fa5ee0b Signed-off-by: Yogish Kulkarni <yogishk@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1992714 (cherry picked from commit 1b1d95284c026c68c7cf1c22ae8a113b82128a9e) Reviewed-on: https://git-master.nvidia.com/r/1996342 GVS: Gerrit_Virtual_Submit Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* DRM: tegra_udrm: implement DRM_TEGRA_UDRM_* ioctlsYogish Kulkarni2019-01-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DRM_TEGRA_UDRM_DMABUF_MMAP: Allocate id using idr_alloc. Associate dmabuf fd passed by user space to this id. Return offset which user space will use in subsequent mmap() by doing id << PAGE_SHIFT. DRM_TEGRA_UDRM_DMABUF_DESTROY_MAPPINGS: Find id associated with dmabuf fd, destroy that id and pointer associated with the id. DRM_TEGRA_UDRM_CLOSE_NOTIFY: Acquire reference to the internal eventfd context associated with eventfd passed by user space. Signal this eventfd from driver's preclose method. DRM_TEGRA_UDRM_SEND_VBLANK_EVENT: Inject event sent by user-space into drm frame work using drm_send_event(). DRM_TEGRA_UDRM_DROP_MASTER_NOTIFY: Acquire reference to the internal eventfd context associated with eventfd passed by user space. Signal this eventfd from driver's master_drop method. Bug 200473544 Bug 2158091 Change-Id: Idbc54f7ede2c70249d0a997f125903101877c62c Signed-off-by: Yogish Kulkarni <yogishk@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1962785 (cherry picked from commit e4bdca8e2f86a712bdafaab319329d90c9dc221d) Reviewed-on: https://git-master.nvidia.com/r/1991018 GVS: Gerrit_Virtual_Submit Reviewed-by: Alka Mohite <amohite@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>
* DRM: tegra_udrm: Add tegra_udrm DRM driveryogishk2019-01-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add skeleton for tegra_udrm DRM driver. This driver adds Kernel DRM support for user mode DRM driver on NVIDIA Tegra Soc. OSS DRM clients (e.g. Wayland compositors) expects DRM driver node like "/dev/dri/card0" and they do raw open()/close() on this node and pass the obtained fd to UMD (in our case libdrm_nvdc.so). Clients also tends to do poll()/read() and mmap(). To support this tegra_udrm registers with DRM framework and provides following ioctls - DRM_IOCTL_TEGRA_UDRM_DMABUF_MMAP : To support mmap(), UMD issues this ioctl to send dmabuf fd to the driver. Driver will return offset which user space can use in mmap(2) on tegra_udrm device fd. DRM_IOCTL_TEGRA_UDRM_DMABUF_DESTROY_MAPPINGS: Clear stored dmabuf fds and offsets. DRM_IOCTL_TEGRA_UDRM_CLOSE_NOTIFY : In order to know when DRM client has called close() on driver fd, UMD issues this ioctl with eventfd. This eventfd will be signaled by the driver in .preclose method. When clear field in ioctl arg is set, driver will no longer signal this eventfd. DRM_IOCTL_TEGRA_UDRM_SEND_VBLANK_EVENT: DRM clients do poll()/read() on driver fd to get vblank/pageflip events. To dilever this events to clients, UMD issues this ioctl with vblank event. Driver injects this event in DRM framework. To prevent user-space from unintentionally inserting tegra_udrm.ko, we add modeset module parameter. Driver's init will fail unless it is inserted with modeset=1. This driver can't be used with libdrm as UMD. It also doesn't support ioctl() on driver fd Bug 200473544 Bug 2158091 Change-Id: I2b463a61a968621f7ec18d788e19c218c5091f06 Signed-off-by: Yogish Kulkarni <yogishk@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1954618 (cherry picked from commit 2f14a005053b32790f6fbccaa91c5a0baec4fc4d) Reviewed-on: https://git-master.nvidia.com/r/1956232 GVS: Gerrit_Virtual_Submit Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* nvidia: use $(srctree.$(overlay))Stephen Warren2017-11-09
| | | | | | | | | | | | | | | | | | | Update all Makefiles to make use of the new srctree.$(overlay) variables to remove hard-coding the path to any overlays. One direct reference remains in a hard-coded include statement in drivers/misc/tegra-cec/. Bug 1978395 Change-Id: I5cdce04e019567a9bbfffaf0e92a61bd16806e99 Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1593800 Reviewed-by: Alexander Van Brunt <avanbrunt@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> Reviewed-by: Timo Alho <talho@nvidia.com> Tested-by: Timo Alho <talho@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* nvidia: use kernel overlay featuresStephen Warren2017-10-29
| | | | | | | | | | | | | | | | Update all Kconfig files and Makefiles to rely on the kernel overlay feature. In particular, don't include any Kconfig files or Makefiles from other overlays. -I directives in CFLAGS are not yet cleaned up. Bug 1978395 Change-Id: I425d37d55f8ea61fb3a082a1504f994ff30cec03 Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1561187 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* nvidia: Replace t18x/ in relative path with nvidia/Ishan Mittal2017-06-08
| | | | | | | | | | | | t18x repo will be discontinued and all code that resides there is moved into nvidia/. So, every reference to t18x/ should be corrected to nvidia/ Bug 200295104 Change-Id: I01ca1118de043511edca829e1cb2b8b52fb398df Signed-off-by: Vandana Salve <vsalve@nvidia.com>
* nvidia: Setting proper names to Makefiles & KconfigIshan Mittal2017-06-08
| | | | | | | | | | | | | | | Makefiles and Kconfig files are picked up based on project name being the extension. Makefiles and Kconfig files brought over from t18x have .t18x suffix. Changed to .nvidia Bug 200295104 Change-Id: Idade26f293c1faaf74f53b2ab20798c47652bdb9 Signed-off-by: Ishan Mittal <imittal@nvidia.com>
* drm/tegra: nvdec: se soc/tegra/kfuse header for kfuseLaxman Dewangan2017-02-01
| | | | | | | | | | | | | | | | | | Use the header <soc/tegra/kfuse.h> for kfuse defines instead of legacy header <linux/platform/tegra/tegra_kfuse.h>. The legacy header for kfuse <linux/platform/tegra/tegra_kfuse.h> is going to be removed. bug 200257381 Change-Id: I83b894e1d912b87fde7b24b78c54a633027e0c09 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/1291988 Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> Reviewed-by: Shardar Mohammed <smohammed@nvidia.com> Reviewed-by: Sujeet Baranwal <sbaranwal@nvidia.com> GVS: Gerrit_Virtual_Submit
* t18x: renaming KConfigs & Makefiles to add suffixdmitry pervushin2016-07-22
| | | | | | | | | | | | | Bug 1783210 Signed-off-by: dmitry pervushin <dpervushin@nvidia.com> Change-Id: I20c29b4dd5947d296a6ab1e83d47e569e386855b Reviewed-on: http://git-master/r/1176347 Reviewed-on: http://git-master/r/1177303 GVS: Gerrit_Virtual_Submit Reviewed-by: Alexander Van Brunt <avanbrunt@nvidia.com> Tested-by: Alexander Van Brunt <avanbrunt@nvidia.com> Reviewed-on: http://git-master/r/1183017
* kernel: t18x: change kernel pathPritesh Raithatha2016-05-25
| | | | | | | | | | | | | All kernel versions are getting moved inside $TOP/kernel folder. Changing kernel paths accordingly. Bug 200190733 Change-Id: Ia0353dd4be3fb3d76bbfc82609be99546a217f92 Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com> Reviewed-on: http://git-master/r/1143409 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
* gpu: nvgpu: move t18x code to kernel-nvgpu-t18xAlex Van Brunt2016-04-04
| | | | | | | | | | | | | | | Part of moving the nvgpu driver out of the common kernel is moving the T18x part of the nvgpu driver out of kernel-t18x. So, update the Makefile to replect this change. bug 200187033 Change-Id: I11e0a73c80648ea15e9a81fe2767fe1d05ab8c2f Signed-off-by: Alex Van Brunt <avanbrunt@nvidia.com> Reviewed-on: http://git-master/r/1119777 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> GVS: Gerrit_Virtual_Submit
* gpu: nvgpu: post CILP_PREEMPTION_STARTED/COMPLETE eventsDeepak Nibade2016-04-01
| | | | | | | | | | | | | | | | Remove posting of events using old channel event API i.e. gk20a_channel_post_event() Also, update gk20a_channel_semaphore_wakeup() to post events when called from ce2_nonblockpipe_isr() Bug 200089620 Change-Id: I677cdab11183a649663ff9272a527c63b9994430 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1112275 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
* gpu: nvgpu: Determine ECC-enabled units for GP10BSami Kiminki2016-03-30
| | | | | | | | | | | | | | Determine ECC-enabled units for GP10B by reading fuses/registers. Bug 1637486 Change-Id: I6431709e3c405d6156dd96438df14d4054b48644 Signed-off-by: Sami Kiminki <skiminki@nvidia.com> Signed-off-by: Adeel Raza <araza@nvidia.com> Reviewed-on: http://git-master/r/780992 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
* gpu: nvgpu: gp10b: add emc clock requestSeshendra Gadagottu2016-03-23
| | | | | | | | | | | | | | Use Bandwidth manager API to request required emc clock. Bug 1673672 Change-Id: I909213d2a69a45939247fd079b1c57ce93be6e0e Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-on: http://git-master/r/843777 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
* gpu: nvpgu: setup fecs_trace hal operationsThomas Fleury2016-03-23
| | | | | | | | | | bug 1648908 Change-Id: I630f74f09e0a4143f5028c88634b9793ec86b279 Signed-off-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-on: http://git-master/r/1022730 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
* gpu: nvgpu: add function to access ptimer timeArul Sekar2016-03-22
| | | | | | | | | | | | | | | bug 1648908 Change-Id: I32211b13489b21eba25f7473a18b9d1a303d2642 Signed-off-by: Arul Sekar <aruls@nvidia.com> Reviewed-on: http://git-master/r/1029733 Reviewed-by: Arun Gona <agona@nvidia.com> Tested-by: Arun Gona <agona@nvidia.com> Reviewed-on: http://git-master/r/1111716 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
* gpu: nvgpu: gp10b: Update regops whitelistTerje Bergstrom2016-03-15
| | | | | | | | | | | | Update regops whitelist with two new registers. Bug 1734151 Change-Id: Id09bdfb1733620bb75d4558299c5e9c7f66bb00b Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1029772 GVS: Gerrit_Virtual_Submit Reviewed-by: Richard Zhao <rizhao@nvidia.com>
* gpu: host1x: enable gather filter for T186Deepak Nibade2016-03-15
| | | | | | | | | | | | Bug 1704301 Change-Id: Id783a06f353ae4627103ac48ab903eefd9b2ec7b Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1029502 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Arto Merilainen <amerilainen@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
* drm/tegra: add T186 support to TSECDeepak Nibade2016-03-15
| | | | | | | | | | | | | | | | | Define tsec_t186_config/tsecb_t186_config and tsec_t186_ops for TSEC Define .load_regs = tsec_load_streamid_regs() for TSEC streamid support Bug 1704301 Change-Id: Ibf3219973627802ee4301c5a23e766d9953dbc3b Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1029501 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
* gpu: host1x: keep device powered on during submitDeepak Nibade2016-03-15
| | | | | | | | | | | | | | | Get pm_runtime reference on device to keep device powered on during submit Bug 1704301 Change-Id: I71d4b4dc6317445bc3d1832ffd3bd4c7afadc654 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1029500 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Arto Merilainen <amerilainen@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
* drm/tegra: add T186 support to NVJPGDeepak Nibade2016-03-15
| | | | | | | | | | | | | | | | | Define nvjpg_t186_config and nvjpg_t186_ops for NVJPG Define .load_regs = nvjpg_load_streamid_regs() for NVJPG streamid support Bug 1704301 Change-Id: I7181a414ebe4ff5db3ce70592494cda13f03f784 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1029499 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Arto Merilainen <amerilainen@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
* drm/tegra: add T186 support to NVDECDeepak Nibade2016-03-15
| | | | | | | | | | | | | | | | | | | Define nvdec_t186_config and nvenc_t186_ops for NVDEC Define .load_regs = nvdec_load_streamid_regs() for NVDEC streamid support Define prepare_poweroff() and finalize_poweron() Bug 1704301 Change-Id: Ibfbb9f40ca4646e7d3afa4a150f6303e0399299c Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1029498 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Arto Merilainen <amerilainen@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
* drm/tegra: add T186 support to NVENCDeepak Nibade2016-03-15
| | | | | | | | | | | | | | | | | Define nvenc_t186_config and nvenc_t186_ops for NVENC Define .load_regs = nvenc_load_streamid_regs() for NVENC streamid support. Bug 1704301 Change-Id: I71efcfe4208568b5e4cbc463444d7d4a6ccfb96c Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1026451 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Arto Merilainen <amerilainen@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
* gpu: nvgpu: gp10b: update prod setiingsSeshendra Gadagottu2016-03-14
| | | | | | | | | | | | | Add/update following prod settings: blcg ce slcg ce2 Change-Id: I10a62d980479ad23efd7033d29e269c4aac08834 Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-on: http://git-master/r/1030986 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
* gpu: nvgpu: gp10b: Allow importing makefile via includeTerje Bergstrom2016-03-14
| | | | | | | | | | | | | Refactor makefiles so that there is one makefile, and that file can be included in the main nvgpu build. Bug 1476801 Change-Id: I23ac451d695fc64064de2300e83b9d9487c52743 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1028353 Reviewed-by: Konsta Holtta <kholtta@nvidia.com> GVS: Gerrit_Virtual_Submit
* gpu: nvgpu: t18x: update blcg prod settingsSeshendra Gadagottu2016-03-11
| | | | | | | | | | | | | | Update prod settings to disable stall blcg. Bug 1729471 Change-Id: I1123bf47159fc9dbb1223aebcacf37361b90743f Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-on: http://git-master/r/1026611 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
* drm/tegra: add T186 support to VICDeepak Nibade2016-03-08
| | | | | | | | | | | | | | | | | Define vic_t186_config and vic_t186_ops for VIC Define .load_regs = vic_load_streamid_regs() for VIC streamid support Bug 1704301 Change-Id: Ib364c773c6c340c30e2644ef0baca500d89de55c Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1023439 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Arto Merilainen <amerilainen@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
* gpu: host1x: API to load streamid registersDeepak Nibade2016-03-08
| | | | | | | | | | | | | | | | | | | | Define host1x_dev_ops for T186 Add API load_streamid_regs() to load streamid registers Set this API to host1x_dev_ops.load_regs so that we set streamid registers during host1x_probe() Add a static table which includes streamid mappings for all the clients Bug 1704301 Change-Id: I7aeefc43776472a7ccf868bfa18c810f3b80b52b Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1023438 Reviewed-by: Arto Merilainen <amerilainen@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
* gpu: host1x: add T186 supportDeepak Nibade2016-03-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add host1x05 version and fill in the h/w details in host1x05_info Add all the hardware accessors for T186 (channel, sync, uclass accessors) Add hardware support files for host1x channel, syncpoints, cdma, pushbuffer, interrupt, and debug support Keep gather filter disabled Things working with this : - cdma operations - basic channel job submit path - syncpoint support - syncpoint interrupt mechanism - debug dump With this support, below tests pass for VIC client $nvrm_channel channel_Basic $nvrm_channel --module=vic Bug 1704301 Change-Id: I7d97560cb1e3a57733fa0853936b0783c71b7060 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1021434 GVS: Gerrit_Virtual_Submit Reviewed-by: Arto Merilainen <amerilainen@nvidia.com> Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
* gpu: nvgpu: gp10b: only create ECC stats onceAdeel Raza2016-03-03
| | | | | | | | | | | | | | The ECC sysfs stat creation function is called on GR init. GR can get initialized multiple times but we only need to create the ECC stats once. Therefore, add a check to avoid creating duplicate stat sysfs nodes. Change-Id: Ifb338e57643f2f15492df137d2a7521e0c990cf2 Signed-off-by: Adeel Raza <araza@nvidia.com> Reviewed-on: http://git-master/r/1021660 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
* gpu: nvgpu: gp10b: make local symbol staticAmit Sharma2016-03-02
| | | | | | | | | | | | | | | | Fixed the following sparse warning by making local symbol static: - platform_gp10b_tegra.c:365: warning: symbol 'ecc_hash_table' was not declared. Should it be static? Bug 200088648 Change-Id: Iea1a682c3ee0609730366d44fab91849cd59c9ad Signed-off-by: Amit Sharma <amisharma@nvidia.com> Reviewed-on: http://git-master/r/1022410 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Sachin Nikam <snikam@nvidia.com> Tested-by: Sachin Nikam <snikam@nvidia.com>
* gpu: nvgpu: t18x: update slcg prod settingsSeshendra Gadagottu2016-03-02
| | | | | | | | | | | | | | Update prod settings to disable slcg pbdma related domains. Bug 1703083 Change-Id: I9f9192da69d07c5cea5bc7d79a031e5d2428b685 Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-on: http://git-master/r/1022219 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
* Revert "Revert "gpu: nvgpu: gp10b: enable gpu rail gating""Seshendra Gadagottu2016-02-26
| | | | | | | | | | | This reverts commit 7c1f6f0b2998c354f315b431e00f3c8f861cb190. Bug 200176691 Change-Id: Ia546513ec5c61999f6eb4d56ccd7e45ae072167c Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-on: http://git-master/r/1020813 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
* gpu: nvgpu: ECC overrideSupriya2016-02-26
| | | | | | | | | | | | | | | | -sysfs functions to call into LS PMU and modify ECC overide register Bug 1699676 Change-Id: Iaf6cc3a86160b806e52ab168577caad42b2c5d22 Signed-off-by: Supriya <ssharatkumar@nvidia.com> Reviewed-on: http://git-master/r/921252 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
* Revert "gpu: nvgpu: gp10b: enable gpu rail gating"Prashant Gaikwad2016-02-24
| | | | | | | | | | | | | | | | | | This reverts commit 71b59d75fc49e2159830026bce387ef4d829faa8 since it causes suspend_sanity to fail on quill platform. On system resume, we see the following error dump from GPU gk20a 17000000.gp10b: gk20a_channel_timeout_handler: Job on channel 501 timed out gk20a 17000000.gp10b: gk20a_fifo_set_ctx_mmu_error_ch: channel 501 generated a mmu fault gk20a 17000000.gp10b: gk20a_set_error_notifier: error notifier set to 31 for ch 501 gk20a 17000000.gp10b: gk20a_channel_timeout_handler: Job on channel 509 timed out Change-Id: I61bc3b0745fe136675ab79b13f54e9126602f51c Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com> Reviewed-on: http://git-master/r/1017967 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
* gpu: nvgpu: gp10b: enable gpu rail gatingSeshendra Gadagottu2016-02-23
| | | | | | | | | | | Bug 1698618 Change-Id: Iabfd726891165d7879376ab96445b7b81b907153 Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-on: http://git-master/r/841856 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
* gpu: nvgpu: gp10b: Enable adaptive ELPGMahantesh Kumbar2016-02-22
| | | | | | | | | | | | ELPG is enabled on TOT. Bug 200144583 Change-Id: Icbdcb5f575a4ca37becf47b098fbd6a1f89feec7 Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com> Reviewed-on: http://git-master/r/1013845 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
* gpu: nvgpu: gp10b: add ECC stats sysfs nodesAdeel Raza2016-02-19
| | | | | | | | | | | Add sysfs nodes for querying ECC single/double bit error counts. Bug 1699676 Change-Id: I6d5219facadaa17207ac759b88fe19077207d8f1 Signed-off-by: Adeel Raza <araza@nvidia.com> Reviewed-on: http://git-master/r/935363 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
* gpu: nvgpu: pass channel pointer to handle sm exceptionDeepak Nibade2016-02-16
| | | | | | | | | | | | | Pass faulting channel pointer to gr_gk20a_handle_sm_exception() instead of NULL Bug 200156699 Change-Id: I909327e2a000bea8bc91cfd0820a759960664b46 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1011289 GVS: Gerrit_Virtual_Submit Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
* gpu: nvgpu: fix sparse warningDeepak Nibade2016-02-09
| | | | | | | | | | | | | | fix below sparse warning : drivers/gpu/nvgpu/gp10b/gr_gp10b.c:1364:5: warning: symbol 'gr_gp10b_pre_process_sm_exception' was not declared. Should it be static? Bug 200088648 Change-Id: Ie55ffc12eb653b10358001e2aef8766562fd0df9 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1009938 Reviewed-by: Sachin Nikam <snikam@nvidia.com>