Skip to content
  1. Feb 07, 2020
    • Bhawanpreet Lakha's avatar
      drm/amd/display: Add sysfs interface for set/get srm · 9037246b
      Bhawanpreet Lakha authored
      
      
      [Why]
      PSP doesn't have the ability to store SRM in a non-volatile memory.  And since
      the kernel cannot write to the storage directly, we need usermode to facilitate
      this
      
      As per spec the SRM needs to be persistent so this interface is to be
      called by the usermode anytime the system goes down/powers on
      
      *boot/resume: load from storage
      *shutdown/suspend: save to storage
      
      [How]
      Provide a sysfs interface so that the usermode can set/get srm at the right times
      
      save to storage: call "cat /sys/class/drm/card0/device/hdcp_srm > file" after boot and resume
      	-driver calls psp_get_srm() to get the stored srm and outputs it
      
      load from storage: call "cat file > /sys/class/drm/card0/device/hdcp_srm" before shutdown and suspend
      	-driver reads the file from sysfs and calls psp_set_srm() to send the SRM to PSP
      
      v2:
      -update commit description
      -add comment about sysfs file handling in the code
      
      v3:
      - squash in use after free fix (Dan Carpenter)
      
      Signed-off-by: default avatarBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
      Reviewed-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
      Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      9037246b
  2. Feb 05, 2020
  3. Feb 04, 2020
  4. Jan 31, 2020
  5. Jan 28, 2020