1. 13 10月, 2016 1 次提交
    • G
      drm/amdgpu: use .early_unregister hook to remove DP AUX i2c · 40492f60
      Grazvydas Ignotas 提交于
      When DisplayPort AUX channel i2c adapter is registered, drm_connector's
      kdev member is used as a parent, so we get sysfs structure like:
        /drm/card1/card1-DP-2/i2c-12
      Because of that, there is a problem when drm core (and not the driver)
      calls drm_connector_unregister(), it removes parent sysfs entries
      ('card1-DP-2' in our example) while the i2c adapter is still registered.
      Later we get a WARN when we try to unregister the i2c adapter:
      
        WARNING: CPU: 3 PID: 1374 at fs/sysfs/group.c:243 sysfs_remove_group+0x14c/0x150
        sysfs group ffffffff82911e40 not found for kobject 'i2c-12'
      
      To fix it, we can use the .early_unregister hook to unregister the i2c
      adapter before drm_connector's sysfs is torn down.
      Signed-off-by: NGrazvydas Ignotas <notasas@gmail.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      40492f60
  2. 07 10月, 2016 1 次提交
  3. 04 10月, 2016 2 次提交
  4. 22 9月, 2016 1 次提交
    • B
      drm/amdgpu: mark symbols static where possible · 4d446656
      Baoyou Xie 提交于
      We get 7 warnings when building kernel with W=1:
      drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1990:5: warning: no previous prototype for 'amdgpu_pre_soft_reset' [-Wmissing-prototypes]
      drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c:1548:5: warning: no previous prototype for 'amdgpu_connector_virtual_dpms' [-Wmissing-prototypes]
      drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c:1560:5: warning: no previous prototype for 'amdgpu_connector_virtual_set_property' [-Wmissing-prototypes]
      drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c:330:5: warning: no previous prototype for 'amdgpu_cs_list_validate' [-Wmissing-prototypes]
      drivers/gpu/drm/amd/amdgpu/dce_virtual.c:98:6: warning: no previous prototype for 'dce_virtual_stop_mc_access' [-Wmissing-prototypes]
      drivers/gpu/drm/amd/amdgpu/dce_virtual.c:130:6: warning: no previous prototype for 'dce_virtual_resume_mc_access' [-Wmissing-prototypes]
      drivers/gpu/drm/amd/amdgpu/dce_virtual.c:136:6: warning: no previous prototype for 'dce_virtual_set_vga_render_state' [-Wmissing-prototypes]
      
      In fact, all of the functions are only used in the file
      in which they are declared and don't need a declaration,
      but can be made static.
      
      So this patch marks both functions with 'static'.
      Reviewed-by: NChristian König <christian.koenig@amd.com>
      Signed-off-by: NBaoyou Xie <baoyou.xie@linaro.org>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      4d446656
  5. 09 8月, 2016 1 次提交
  6. 08 7月, 2016 1 次提交
    • L
      drm/amdgpu: Poll for both connect/disconnect on analog connectors · b636a1b3
      Lyude 提交于
      DRM_CONNECTOR_POLL_CONNECT only enables polling for connections, not
      disconnections. Because of this, we end up losing hotplug polling for
      analog connectors once they get connected.
      
      Easy way to reproduce:
       - Grab a machine with an AMD GPU and a VGA port
       - Plug a monitor into the VGA port, wait for it to update the connector
         from disconnected to connected
       - Disconnect the monitor on VGA, a hotplug event is never sent for the
         removal of the connector.
      
      Originally, only using DRM_CONNECTOR_POLL_CONNECT might have been a good
      idea since doing VGA polling can sometimes result in having to mess with
      the DAC voltages to figure out whether or not there's actually something
      there since VGA doesn't have HPD. Doing this would have the potential of
      showing visible artifacts on the screen every time we ran a poll while a
      VGA display was connected. Luckily, amdgpu_vga_detect() only resorts to
      this sort of polling if the poll is forced, and DRM's polling helper
      doesn't force it's polls.
      
      Additionally, this removes some assignments to connector->polled that
      weren't actually doing anything.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NLyude <cpaul@redhat.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      b636a1b3
  7. 25 5月, 2016 1 次提交
    • M
      drm/amdgpu: Fix hdmi deep color support. · 9d746ab6
      Mario Kleiner 提交于
      When porting the hdmi deep color detection code from
      radeon-kms to amdgpu-kms apparently some kind of
      copy and paste error happened, attaching an else
      branch to the wrong if statement.
      
      The result is that hdmi deep color mode is always
      disabled, regardless of gpu and display capabilities and
      user wishes, as the code mistakenly thinks that the display
      doesn't provide the required max_tmds_clock limit and falls
      back to 8 bpc.
      
      This patch fixes deep color support, as tested on a
      R9 380 Tonga Pro + suitable display, and should be
      backported to all kernels with amdgpu-kms support.
      Signed-off-by: NMario Kleiner <mario.kleiner.de@gmail.com>
      Cc: stable@vger.kernel.org
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      9d746ab6
  8. 05 5月, 2016 1 次提交
  9. 03 3月, 2016 1 次提交
    • A
      drm/amdgpu: return from atombios_dp_get_dpcd only when error · 0b39c531
      Arindam Nath 提交于
      In amdgpu_connector_hotplug(), we need to start DP link
      training only after we have received DPCD. The function
      amdgpu_atombios_dp_get_dpcd() returns non-zero value only
      when an error condition is met, otherwise returns zero.
      So in case the function encounters an error, we need to
      skip rest of the code and return from amdgpu_connector_hotplug()
      immediately. Only when we are successfull in reading DPCD
      pin, we should carry on with turning-on the monitor.
      Signed-off-by: NArindam Nath <arindam.nath@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      0b39c531
  10. 22 8月, 2015 1 次提交
  11. 04 6月, 2015 2 次提交