summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/dc/nvhdcp.c
AgeCommit message (Collapse)Author
2014-04-23nvhdcp: add check for hdmi hpd disconnectAnshuman Nath Kar
Bug 1448899 Bug 1407942 Change-Id: I506ffe3895aef566515d5951f247906c99ddce95 Signed-off-by: Anshuman Nath Kar <anshumank@nvidia.com> Reviewed-on: http://git-master/r/394402 (cherry picked from commit a06c405d4b40b8b3a55f0209d88bed76c22ec36e) Reviewed-on: http://git-master/r/395391 Reviewed-by: Jon Mayo <jmayo@nvidia.com> Tested-by: Jon Mayo <jmayo@nvidia.com>
2014-01-21video: tegra: dc: hookup compat_ioctlPeng Du
Change-Id: I70af47cd830cb8fafc1131145e2775a2ca713f3b Signed-off-by: Peng Du <pdu@nvidia.com> Reviewed-on: http://git-master/r/214728 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Chao Xu <cxu@nvidia.com>
2013-11-08video: tegra: dc: use cancel_delayed_work_sync()Deepak Nibade
- nvhdcp driver uses flush_workqueue() - instead make use of cancel_delayed_work_sync() since work scheduled is delayed work Bug 1308191 Change-Id: I40f841c417cda9b6f40bb9da5c86c0b8944807e9 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/302383 Reviewed-on: http://git-master/r/303810 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
2013-10-30tegra: dc: copied bksv into the packet structuresharath
copied bksv from tegra_nvhdcp structure to tegra_nvhdcp_packet structure. bug 1354159 Change-Id: I6157428a6044977de5365b048ac20a35ffbc109a Signed-off-by: sharath <ssarangpur@nvidia.com> Reviewed-on: http://git-master/r/281198 Reviewed-by: Marvin Zhang <mzhang@nvidia.com> Reviewed-by: Jon Mayo <jmayo@nvidia.com> Reviewed-by: Thomas Cherry <tcherry@nvidia.com> Signed-off-by: Sharath Sarangpur <ssarangpur@nvidia.com> Reviewed-on: http://git-master/r/301485 Reviewed-by: Automatic_Commit_Validation_User
2013-09-14HDCP: finish hdmi access before turning nvhdcp offRakesh Iyer
Wait for hdmi accesses to finish before turning nvhdcp off. Bug 1275577. Change-Id: Ieef8635b66cfdddece7b2e1140b776b91350d272 Signed-off-by: Rakesh Iyer <riyer@nvidia.com> Reviewed-on: http://git-master/r/227243 (cherry picked from commit ac6205a26fbf52d8439524543321012ed95c9d78) Reviewed-on: http://git-master/r/231236 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Jon Mayo <jmayo@nvidia.com>
2013-09-14nvhdcp: return v_prime in get_nvhdcp_state ioctl.Marvin Zhang
hdcp upstream library needs to get v_prime from kernel and pass it to tsec to do v_prime verification. Bug 1197884 Change-Id: I9a6783e115751426bcbb97feaba999812091aa90 Signed-off-by: Marvin Zhang <mzhang@nvidia.com> Reviewed-on: http://git-master/r/205639 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com> (cherry picked from commit 932c91861cb5f71a52cdc6a62cd22648c86653cc) Reviewed-on: http://git-master/r/213673 Reviewed-by: Karan Jhavar <kjhavar@nvidia.com> Reviewed-by: Jon Mayo <jmayo@nvidia.com>
2013-09-14nvhdcp: return bksv_list for upstream protocol.Marvin Zhang
add returning bksv_list support from function get_nvhdcp_state. upstream library gets bksv_list and passes it to tsec in order to verify the validity of downstream devices. Bug 1197884 Change-Id: I58ba2c5c4200ffb95ab9f929eecb1e9ebb60b5c9 Signed-off-by: Marvin Zhang <mzhang@nvidia.com> Reviewed-on: http://git-master/r/190034 Reviewed-by: James Zhao <jamesz@nvidia.com> Tested-by: James Zhao <jamesz@nvidia.com> Reviewed-by: Jon Mayo <jmayo@nvidia.com> (cherry picked from commit 2c6b09135f87293170a09270f77f413e07e7cf67) Reviewed-on: http://git-master/r/213672 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Karan Jhavar <kjhavar@nvidia.com>
2013-09-14HDCP: export nvhdcp state using ioctlJames Zhao
Export nvhdcp state to user land to check hdcp link is verified before doing anything else. Reviewed-on: http://git-master/r/188466 (cherry picked from commit 4305e7007e73e361fc351d94eb76ce52ff074ed5) Change-Id: I2d40ce69d0726e6d7817462519a47e68a800c21d Signed-off-by: James Zhao <jamesz@nvidia.com> Reviewed-on: http://git-master/r/200908 Reviewed-by: Jon Mayo <jmayo@nvidia.com>
2013-09-14video: tegra: dc: power host1x during HDCP linkJon Mayo
Add tegra_dc_io_start/end to take host1x references while negotiating HDCP. Without these the module can be turned off and some state won't be programmed properly. Bug 1176386 Change-Id: I1893b017f09a406965b478b0a9de1730b16ca0ac Signed-off-by: Jon Mayo <jmayo@nvidia.com> Reviewed-on: http://git-master/r/164809 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2013-09-14Revert "video: tegra: hdcp: Fix Locking Issue"Matt Wagner
This reverts commit 51f746421b73f8f378bd7908b35fd6c79687e239. Bug 1030468 Bug 1030415 Signed-off-by: Matt Wagner <mwagner@nvidia.com> Change-Id: If9b5febd812e84848913431dcaf0bdefc518e5d1 Reviewed-on: http://git-master/r/126948 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Jon Mayo <jmayo@nvidia.com> Rebase-Id: R8da23eeb506f301852948a10bca745a1faa3fd95
2013-09-14Revert "video: tegra: hdcp: Add Missing Lock"Matt Wagner
This reverts commit 77c8da0aa18fad9e33fd8b1afb2013b1a476d74e. Bug 1030468 Bug 1030415 Signed-off-by: Matt Wagner <mwagner@nvidia.com> Change-Id: I2b85159dfcfc40b3a3632dc1300c729e0977a18f Reviewed-on: http://git-master/r/126946 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Jon Mayo <jmayo@nvidia.com> Rebase-Id: R0201f08911c667e9dedcfeb7f5cc6543f6a41e61
2013-09-14video: tegra: hdcp: Add Missing LockMatt Wagner
Lock was missing around one state set, so we add it here. Bug 1024031 Change-Id: Iab013fff7e8519e8bcc91e84a5ca7cd6e6e783da Signed-off-by: Matt Wagner <mwagner@nvidia.com> Reviewed-on: http://git-master/r/122802 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Jon Mayo <jmayo@nvidia.com> Rebase-Id: R5f56f5fde012ee95bfe4c601205b6d03fe3faeda
2013-09-14video: tegra: hdcp: Fix Locking IssueMatt Wagner
Locking in nvhdcp was set up in such a way that we couldn't change the state of the HDMI plug while negotiating the HDCP connection. Another lock was added that is only taken when the state of the plug or hdcp session are changed. This enables correct failure if the plug is removed during negotiation. Bug 1024031 Reviewed-on: http://git-master/r/120546 (cherry picked from commit 51f746421b73f8f378bd7908b35fd6c79687e239) Change-Id: Id9a9b09f2cd03a1b51e7334391f35fc076a1e1dd Signed-off-by: Matt Wagner <mwagner@nvidia.com> Reviewed-on: http://git-master/r/121399 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Jon Mayo <jmayo@nvidia.com> Rebase-Id: Rbe2988d8b235501874f49c07844e70f5b26a2cdd
2013-09-14video: tegra: dc: split dc.c into smaller filesJon Mayo
Moved mode setting code into mode.c Move window code info window.c Moved clock related code into clock.c Moved LUT and gamma related code into lut.c Moved csc(color space conversion) into csc.c Removed unnecessary static function prototypes from header. Moved many short inline functions to dc_priv.h Cleaned up copyright headings. Cleaned up formatting and indent in all files. Fixed build warnings. Bug 870907 Change-Id: I6ccc37150191765394f0b5629423eafd4e5e5792 Signed-off-by: Jon Mayo <jmayo@nvidia.com> Reviewed-on: http://git-master/r/111371 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Rebase-Id: Rc7ed74e733798a26a2af94b2384c5c9f1c9a19d7
2013-09-14video: tegra: dc: reduce HDCP re-negotiation delayDonghan Ryu
some HDCP verification devices requires fast HDCP re-negotiation after link verification failure. 1.75sec is too high to meet their requirement Bug 855002 Reviewed-on: http://git-master/r/44322 Reviewed-on: http://git-master/r/50794 (cherry picked from commit 0e5b68619d03e7413d5c718f98d0820f3c534e86) Change-Id: I69d129a5cd15b4d48409b218ccdea98a35f0cac6 Reviewed-on: http://git-master/r/54171 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Rebase-Id: Recc3e25601b28a9bf829f62acca6eff0feb35b36
2013-09-14video:tegra:dc: fix hdcp hotplug issueKen Chang
bit WRITE16 of HDMI_NV_PDISP_KEY_CTRL_0 shall be polled until it reports DONE, which is value 0 to ensure the write is complete. bug 858744 bug 861719 (cherry picked from commit d37336f3965cd1071afb6b03b979b0409ee480f1) (reviewed on http://git-master/r/49821) Change-Id: I38fe861a265db7d969f3a15f164724294d627cfd Reviewed-on: http://git-master/r/52852 Tested-by: Ken Chang <kenc@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Rebase-Id: Rde95d37c2dfa5d1a169a3aa2a80f304f25b94c03
2013-09-14nvhost: Move include files to kernel/includeTerje Bergstrom
To prepare for kernel modularization, nvhost include files need to be moved from mach-tegra/include to kernel/include. At the same time user space specific part is split into nvhost_ioctl.h. Bug 854182 Original-Change-Id: I3694a40d786028733310ecf5b59341282af571be Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/43211 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: Rb7ecc6a8932947c7dd33bf0e0079442875ae2cd7
2013-09-14video: tegra: dc: use a delayed_work on hdcpDonghan Ryu
hdmi modeset triggers to re-start hdcp and trying to negotiate too early can cause HDCP failure. using delayed_work can avoid this situation by starting HDCP a little bit late Bug 855002 Original-Change-Id: Ic54a6f156845d911e2631b755284362026474012 Reviewed-on: http://git-master/r/43694 Reviewed-by: Donghan Ryu <dryu@nvidia.com> Tested-by: Donghan Ryu <dryu@nvidia.com> Reviewed-by: Jonathan Mayo <jmayo@nvidia.com> Rebase-Id: R353eadbf83e4ee9bb6dd280898eccaaccc021d1a
2013-09-14video: tegra: dc: fix delay on hdmi modesetDonghan Ryu
wait_event_interruptible_timeout checks the condition before it enters a sleep. Adding a real condition to the function avoids an un-wanted aditional sleep. Bug 833476 Original-Change-Id: I03072d1c3b6efb48e20ed42b55ee2d844a29fbbc Reviewed-on: http://git-master/r/43225 Reviewed-on: http://git-master/r/43426 Reviewed-by: Donghan Ryu <dryu@nvidia.com> Tested-by: Donghan Ryu <dryu@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Rebase-Id: Rcb4571b19c3c3499d7bfbfdfae040c6bf454a284
2013-09-14video: tegra: dc: make hdcp respond quickly on HDMI modeset.Seongho Joo
hdcp worker could be in sleep during modeset. The front part of the video could be lost because of it. This change makes hdcp respond quickly to shorten the delay. bug 826468 Reviewed-on: http://git-master/r/36215 (cherry picked from commit e856cedd18d60c3636b694f1fba612259abf7229) Original-Change-Id: I1e907753e1d2eec8514bf5bc2f4166502c5477dc Reviewed-on: http://git-master/r/37422 Tested-by: Seongho Joo <sjoo@nvidia.com> Reviewed-by: Jonathan Mayo <jmayo@nvidia.com> Rebase-Id: R94af8a09f68427762618cac0a9f21f9b5fedbe6b
2013-09-14video: tegra: dc: fix ksv_list query sequence and timeout handlingPeter Zu
- remove delay on i2c r/w success to fix hdcp test case 1b-03 failure - do not turn on hdcp crypt before verifying repeater bug 829599 Original-Change-Id: I43718636342cb0d396cc702a8374d61da72844a7 Reviewed-on: http://git-master/r/34645 Tested-by: Peter Zu <pzu@nvidia.com> Reviewed-by: Jonathan Mayo <jmayo@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com> Rebase-Id: R209e114e898cb2052233d6e8d24a2e5be3fbd32a
2013-09-14video: tegra: dc: stop hdcp when keys are missingJon Mayo
verify Aksv, if it is invalid then quickly disable further hdcp checks. Bug 792855 Original-Change-Id: I4a9d689d571d2f916e11f92f5b897f287f724068 Reviewed-on: http://git-master/r/29899 Reviewed-by: Jonathan Mayo <jmayo@nvidia.com> Tested-by: Jonathan Mayo <jmayo@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com> Rebase-Id: R198c9da7c918732a9b764063d12fd7de3792e5b8
2013-09-14video: tegra: dc: hdcp: renegotiate the hdcp link on resumePeter Zu
bug 802909 Original-Change-Id: I061eb7082b251ef6963e2a68fd9821122e010966 Reviewed-on: http://git-master/r/23871 Reviewed-by: Peter Zu <pzu@nvidia.com> Tested-by: Peter Zu <pzu@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: Jonathan Mayo <jmayo@nvidia.com> Rebase-Id: R255ee5f24d31f5c5a44c09174e2a7089dd300837
2013-09-14video: tegra: dc: Fix several problemsAndrei Warkentin
Resolve potential race between resume and reset Fix wmb after return Change-Id: I98ad1e713b9781d780bf93561496011bf62b86d1 Signed-off-by: Andrei Warkentin <andreiw@motorola.com> Rebase-Id: R248821307a1d2ac9454e50f9fa5bc3ccadc4e092
2013-09-14video: tegra: dc: hdcp: handle the case of DEVICE_COUNT = 0 properlyPeter Zu
When HDCP repeater has no device attached, DEVICE_COUNT reports back as 0. HDCP driver should handle this case as a good case and continue downstream authentication, other than fail it. Change-Id: Ied2e46428c0247f14fbd96016cd4fdbf358f6587 Rebase-Id: R0d45add14c7718d3133fffd8f04a3d75cb1db76f
2013-09-14video: tegra: fix more unplug/suspend timeout in nvhdcpErik Gilling
Change-Id: I30dfa03324eb5c4c344c62578eb808a150c80deb Signed-off-by: Erik Gilling <konkers@android.com> Rebase-Id: R6e70e60d8e02479ada9393d96370ef15dc294029
2013-09-14video: tegra: fix unplug/suspend timeout in nvhdcpErik Gilling
If HDCP was turned off (either by unplug or suspend) the work funciton would wait the full timeout 5 * l.75s before exiting. This causes suspend to timeout and crash. Change-Id: I8eb185452ad09e34f4573874e9766c0e1cec15de Signed-off-by: Erik Gilling <konkers@android.com> Rebase-Id: R1f5d558bc5ddc0a34e3b6db80d783a8dd791b8b2
2013-09-14video: tegra: reset hdcp failure count on hotplugJon Mayo
use tegra_nvhdcp_on/tegra_nvhdcp_off in hotplug handler to clean up state machine. Change-Id: I62fe503f0628ad4b49d5d7d66fe1702122179877 Signed-off-by: Erik Gilling <konkers@android.com> Rebase-Id: Rac4bd11b5fe5f94eacfac9379b39effa45dc7e04
2013-09-14video: tegra: use longer retries for hdcpJon Mayo
use 3 seconds for i2c/ddc failures on hdcp (15 attempts at 250mS each) Change-Id: Ia755c9b42d5a0d8467b68c9d334638bcb015eabd Signed-off-by: Erik Gilling <konkers@android.com> Rebase-Id: R8c761f0f303b8a552019ebaa92a4ca01499c1645
2013-09-14video: tegra: reset hdcp failure count on hotplugErik Gilling
Change-Id: Iba5041f8428b13791004c96e6e8c2ed4dbcc37b8 Signed-off-by: Erik Gilling <konkers@android.com> Rebase-Id: Rd670265d7843988ed883f04685da6568783fd1d6
2013-09-14[ARM] tegra: hdmi nvhdcp driverJon Mayo
Device /dev/nvhdcpX is used to manage NVHDCP on framebuffer /dev/fbX. These devices are created on hdmi driver initialition when it is attached to dc. Currently only one nvhdcp device may be created. An ioctl interface is in video/nvhdcp.h Check for repeaters and store repeater info. userspace application queries this status to authenticate the connection. When authentication fails, auto-renegotiate every 1.75 seconds. Give up after 5 failed attempts, reset after hotplug or policy change. use TEGRA_DC_OUT_NVHDCP_POLICY_ON_DEMAND in tegra_dc_out.flags in board panel configuration to select a different default policy at probe. Currently only TEGRA_DC_OUT_NVHDCP_POLICY_ALWAYS_ON is supported. Change-Id: I0db66fc86096b98d2604544061721d291523de75 Reviewed-by: Jon Mayo <jmayo@nvidia.com> Tested-by: Jon Mayo <jmayo@nvidia.com> Reviewed-by: Phillip Smith <psmith@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com> Signed-off-by: Erik Gilling <konkers@android.com> Rebase-Id: Rd173656814cd1e5bc9fe2c4560772f491deea311