1. 16 Nov, 2016 2 commits
  2. 15 Nov, 2016 3 commits
  3. 11 Nov, 2016 4 commits
    • Mario Kleiner's avatar
      drm/amdgpu: Attach exclusive fence to prime exported bo's. (v5) · 8e94a46c
      Mario Kleiner authored
      External clients which import our bo's wait only
      for exclusive dmabuf-fences, not on shared ones,
      ditto for bo's which we import from external
      providers and write to.
      
      Therefore attach exclusive fences on prime shared buffers
      if our exported buffer gets imported by an external
      client, or if we import a buffer from an external
      exporter.
      
      See discussion in thread:
      https://lists.freedesktop.org/archives/dri-devel/2016-October/122370.html
      
      Prime export tested on Intel iGPU + AMD Tonga dGPU as
      DRI3/Present Prime render offload, and with the Tonga
      standalone as primary gpu.
      
      v2: Add a wait for all shared fences before prime export,
          as suggested by Christian Koenig.
      
      v3: - Mark buffer prime_exported in amdgpu_gem_prime_pin,
          so we only use the exclusive fence when exporting a
          bo to external clients like a separate iGPU, but not
          when exporting/importing from/to ourselves as part of
          regular DRI3 fd passing.
      
          - Propagate failure of reservation_object_wait_rcu back
          to caller.
      
      v4: - Switch to a prime_shared_count counter instead of a
            flag, which gets in/decremented on prime_pin/unpin, so
            we can switch back to shared fences if all clients
            detach from our exported bo.
      
          - Also switch to exclusive fence for prime imported bo's.
      
      v5: - Drop lret, instead use int ret -> long ret, as proposed
            by Christian.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95472
      Tested-by: Mike Lothian <mike@fireburn.co.uk> (v1)
      Signed-off-by: default avatarMario Kleiner <mario.kleiner.de@gmail.com>
      Reviewed-by: Christian König <christian.koenig@amd.com>.
      Cc: Christian König <christian.koenig@amd.com>
      Cc: Michel Dänzer <michel.daenzer@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      8e94a46c
    • Dave Airlie's avatar
      Merge branch 'topic-arcpgu-fixes' of... · e2384535
      Dave Airlie authored
      Merge branch 'topic-arcpgu-fixes' of https://github.com/foss-for-synopsys-dwc-arc-processors/linux into drm-fixes
      
      * 'topic-arcpgu-fixes' of https://github.com/foss-for-synopsys-dwc-arc-processors/linux:
        drm/arcpgu: Accommodate adv7511 switch to DRM bridge
      e2384535
    • Eugeniy Paltsev's avatar
      drm/arcpgu: Accommodate adv7511 switch to DRM bridge · 7bc61cc5
      Eugeniy Paltsev authored
      ARC PGU driver starts crashing on initialization after
      'commit e12c2f64 ("drm/i2c: adv7511: Convert to drm_bridge")'
      This happenes because in "arcpgu_drm_hdmi_init" function we get pointer
      of "drm_i2c_encoder_driver" structure, which doesn't exist after
      adv7511 hdmi encoder interface changed from slave encoder to drm bridge.
      So, when we call "encoder_init" function from this structure driver
      crashes.
      
      Bootlog:
      ------------------------------------->8--------------------------------
      [drm] Initialized drm 1.1.0 20060810
      arcpgu e0017000.pgu: arc_pgu ID: 0xabbabaab
      arcpgu e0017000.pgu: assigned reserved memory node frame_buffer@9e000000
      Path: (null)
      CPU: 0 PID: 1 Comm: swapper Not tainted 4.8.0-00001-gb5642252fa01-dirty #8
      task: 9a058000 task.stack: 9a032000
      
      [ECR   ]: 0x00220100 => Invalid Read @ 0x00000004 by insn @ 0x803934e8
      [EFA   ]: 0x00000004
      [BLINK ]: drm_atomic_helper_connector_dpms+0xa6/0x230
      [ERET  ]: drm_atomic_helper_connector_dpms+0xa4/0x230
      [STAT32]: 0x00000846 : K DE       E2 E1
      BTA: 0x8016d949  SP: 0x9a033e34  FP: 0x00000000
      LPS: 0x8036f6fc LPE: 0x8036f700 LPC: 0x00000000
      r00: 0x8063c118 r01: 0x805b98ac r02: 0x00000b11
      r03: 0x00000000 r04: 0x9a010f54 r05: 0x00000000
      r06: 0x00000001 r07: 0x00000000 r08: 0x00000028
      r09: 0x00000001 r10: 0x00000007 r11: 0x00000054
      r12: 0x720a3033
      
      Stack Trace:
        drm_atomic_helper_connector_dpms+0xa4/0x230
        arcpgu_drm_hdmi_init+0xbc/0x228
        arcpgu_probe+0x168/0x244
        platform_drv_probe+0x26/0x64
        really_probe+0x1f0/0x32c
        __driver_attach+0xa8/0xd0
        bus_for_each_dev+0x3c/0x74
        bus_add_driver+0xc2/0x184
        driver_register+0x50/0xec
        do_one_initcall+0x3a/0x120
        kernel_init_freeable+0x108/0x1a0
      ------------------------------------->8--------------------------------
      
      Fix ARC PGU driver to be able work with drm bridge hdmi encoder
      interface. The hdmi connector code isn't needed anymore as we expect
      the adv7511 bridge driver to create/manage the connector.
      Signed-off-by: default avatarEugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
      Reviewed-by: default avatarArchit Taneja <architt@codeaurora.org>
      Signed-off-by: default avatarAlexey Brodkin <abrodkin@synopsys.com>
      7bc61cc5
    • Dave Airlie's avatar
      Merge branch 'fixes-for-v4.9-rc5' of http://git.agner.ch/git/linux-drm-fsl-dcu into drm-fixes · 76af753b
      Dave Airlie authored
      Yet another small batch of fixes. Two of the patches I had prepared
      since quite some time, but they did not seem to affect operation in
      a visible manner so far. Until recently, when I discovered the third
      issue (disable planes before disabling CRTC), which made the two
      previous fixes necessary.
      
      * 'fixes-for-v4.9-rc5' of http://git.agner.ch/git/linux-drm-fsl-dcu:
        drm/fsl-dcu: disable planes before disabling CRTC
        drm/fsl-dcu: update all registers on flush
        drm/fsl-dcu: do not update when modifying irq registers
      76af753b
  4. 10 Nov, 2016 7 commits
  5. 09 Nov, 2016 6 commits
  6. 08 Nov, 2016 2 commits
    • Andrew Shadura's avatar
      drm/amd/powerplay: return false instead of -EINVAL · f20024d8
      Andrew Shadura authored
      Returning -EINVAL from a bool-returning function
      phm_check_smc_update_required_for_display_configuration has an unexpected
      effect of returning true, which is probably not what was intended.
      Replace -EINVAL by false.
      
      The only place this function is called from is
      psm_adjust_power_state_dynamic in
      drivers/gpu/drm/amd/powerplay/eventmgr/psm.c:106:
      
      	if (!equal || phm_check_smc_update_required_for_display_configuration(hwmgr)) {
      		phm_apply_state_adjust_rules(hwmgr, requested, pcurrent);
      		phm_set_power_state(hwmgr, &pcurrent->hardware, &requested->hardware);
      		hwmgr->current_ps = requested;
      	}
      
      It seems to expect a boolean value here.
      
      This issue has been found using the following Coccinelle semantic patch
      written by Peter Senna Tschudin:
      <smpl>
      @@
      identifier f;
      constant C;
      typedef bool;
      @@
      bool f (...){
      <+...
      * return -C;
      ...+>
      }
      </smpl>
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarAndrew Shadura <andrew.shadura@collabora.co.uk>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      f20024d8
    • Arnd Bergmann's avatar
      drm/amdgpu/powerplay/smu7: fix unintialized data usage · a29d1260
      Arnd Bergmann authored
      A recent bugfix replaced an out-of-bounds access with direct
      use of unintialized data:
      
      drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c: In function 'smu7_patch_limits_vddc':
      drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:2033:6: error: 'vddc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:2146:11: note: 'vddc' was declared here
      drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:2033:6: error: 'vddci' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:2146:17: note: 'vddci' was declared here
        uint32_t vddc, vddci;
      
      This initializes the data as before using the correct type.
      
      Fixes: 77f7f71f ("drm/amdgpu/powerplay/smu7: fix static checker warning")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      a29d1260
  7. 07 Nov, 2016 8 commits
  8. 06 Nov, 2016 2 commits
  9. 05 Nov, 2016 6 commits