aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon
Commit message (Collapse)AuthorAge
* drm/radeon: fix UPLL_REF_DIV_MASK definitionChristian König2013-05-02
| | | | | | | Stupid copy & paste error over all generations. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* radeon: add bo tracking debugfsJerome Glisse2013-05-02
| | | | | | | | | | | | This is to allow debugging of userspace program not freeing buffer after, which is basicly a memory leak. This print the list of all gem object along with their size and placement (VRAM,GTT,CPU) and with the pid of the task that created them. agd5f: add warning fix Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: add new richland pci idsAlex Deucher2013-05-02
| | | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: fix scratch reg handling for UVD fenceChristian König2013-05-02
| | | | | | | | Also init the scratch reg to zero on the UVD ring. This fixes UVD on AGP based cards. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: allocate SA bo in the requested domainChristian König2013-05-02
| | | | | | | This avoid moving the BO directly after allocating it. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: fix possible segfault when parsing pm tablesAlex Deucher2013-05-02
| | | | | | | | | | | If we have a empty power table, bail early and allocate the default power state. Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=63865 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: fix endian bugs in atom_allocate_fb_scratch()Alex Deucher2013-05-02
| | | | | | Reviwed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: disable UVD advanced semaphore modeChristian König2013-04-23
| | | | | | | Not needed and seems to cause some problems. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: fix endian bugs in radeon_atom_get_clock_dividers() (v3)Alex Deucher2013-04-23
| | | | | | | | | v2: fix copy paste typo. v3: clarify new union member Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: fix up audio dto programming for DCE2Alex Deucher2013-04-23
| | | | | | Uses a different register than DCE3 asics. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/evergreen: set SAD registersRafał Miłecki2013-04-23
| | | | | | | | | This allows audio (alsa) driver to read them and have a clue about audio capabilities of connected receiver. This has been verified to be compatible with fglrx behaviour for Onkyo TX-SR605 and Denon 1912. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/si: add support for golden register initAlex Deucher2013-04-23
| | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/cayman,TN: add support for golden register init (v2)Alex Deucher2013-04-23
| | | | | | v2: add richland support Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/evergreen: add support for golden register initAlex Deucher2013-04-23
| | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/7xx: add support for golden register initAlex Deucher2013-04-23
| | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: add helper function to support golden registersAlex Deucher2013-04-23
| | | | | | | Golden registers are arrays of register settings from the hw team that need to be initialized at asic startup. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: fix typo in si_select_se_sh()Alex Deucher2013-04-23
| | | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: switch audio handling to use callbacksAlex Deucher2013-04-23
| | | | | | | | | Register audio callbacks for asic where we support audio. Cleans up the code and makes it easier to add support for newer asics. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: clean up audio dto programmingAlex Deucher2013-04-23
| | | | | | | | | Split into DCE2/3 and DCE4/5 variants. Still todo is to calculate the DTO dividers properly. Add proper formula to the comments. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: clean up audio supported checkAlex Deucher2013-04-23
| | | | | Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: raise UVD clocks on init v3Christian König2013-04-23
| | | | | | | | | | | v2: not only raise the clocks on VCPU boot, but also on IB test. v3: agd5f: fix r600_uvd_init return value. fixes: https://bugs.freedesktop.org/show_bug.cgi?id=63730 Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: raise UVD clocks only on demandChristian König2013-04-23
| | | | | | | | | That not only saves some power, but also solves problems with older chips where an idle UVD block on higher clocks can cause problems. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: put UVD PLLs in bypass modeChristian König2013-04-22
| | | | | | | | | Just power down the PLL when we get a VCLK or DCLK of zero. Enabling the bypass mode early should also allow us to switch UVD clocks on the fly. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: disable audio format interrupts on EvergreenAlex Deucher2013-04-22
| | | | | | | The audio format change interrupts are an aid in debugging, but not required for operation. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: fix hdmi mode enable on RS600/RS690/RS740Alex Deucher2013-04-22
| | | | | | | | These chips were previously skipped since they are pre-R600. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon/evergreen: write default channel numbersRafał Miłecki2013-04-22
| | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/evergreen: reorder HDMI setupRafał Miłecki2013-04-22
| | | | | | | | Driver fglrx setups audio and ACR packets after basic initialization, which sounds sane, do the same. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/evergreen: setup HDMI before enabling itRafał Miłecki2013-04-22
| | | | | | | | Closed source driver fglrx seems to enable infoframes and audio packets at the end, which makes sense, do the same. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: add helpers for masking and setting bits in regsRafał Miłecki2013-04-22
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: fix alignment of UVD fenceChristian König2013-04-22
| | | | | Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: cleanup UVD address checksChristian König2013-04-22
| | | | | | | | Message and feedback buffers must be at start of VRAM, not at start of address space. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: disable the crtcs in mc_stop (evergreen+) (v2)Alex Deucher2013-04-22
| | | | | | | | | | | | | | | Just disabling the mem requests should be enough, but that doesn't seem to work correctly on efi systems. May fix: https://bugs.freedesktop.org/show_bug.cgi?id=57567 https://bugs.freedesktop.org/show_bug.cgi?id=43655 https://bugzilla.kernel.org/show_bug.cgi?id=56441 v2: blank displays first, then disable. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: disable the crtcs in mc_stop (r5xx-r7xx) (v2)Alex Deucher2013-04-22
| | | | | | | | | | Just disabling the mem requests should be enough, but that doesn't seem to work correctly on efi systems. v2: blank displays first, then disable. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: properly lock disp in mc_stop/resume for evergreen+Alex Deucher2013-04-22
| | | | | | | | Need to wait for the new addresses to take affect before re-enabling the MC. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: properly lock disp in mc_stop/resume for r5xx-r7xxAlex Deucher2013-04-22
| | | | | | | | Need to wait for the new addresses to take affect before re-enabling the MC. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: update wait_for_vblank for evergreen+Alex Deucher2013-04-22
| | | | | | | | Properly wait for the next vblank region. The previous code didn't always wait long enough depending on the timing. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: update wait_for_vblank for r5xx-r7xxAlex Deucher2013-04-22
| | | | | | | | Properly wait for the next vblank region. The previous code didn't always wait long enough depending on the timing. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: update wait_for_vblank for r1xx-r4xxAlex Deucher2013-04-22
| | | | | | | | Properly wait for the next vblank region. The previous code didn't always wait long enough depending on the timing. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: Always flush the VMJerome Glisse2013-04-16
| | | | | | | | | | | | | | | | This is slightly cleaned up version of Jerome's patch. There seems to be an issue tracking the last flush of the VM which results in hangs in certain cases when VM is used. For now just flush the VM for every IB. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=62959 https://bugs.freedesktop.org/show_bug.cgi?id=62997 Signed-off-by: Jerome Glisse <jglisse@redhat.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: re-enable PTE/PDE packet for set_page on cayman/TNAlex Deucher2013-04-16
| | | | | | | | | PTE/PDE doesn't support a single update (count = 1). We had previously disabled it since it we were hitting that case which let to hangs. The PTE/PDE packet is much more efficient for VM updates where it can be used. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: cleanup properly if mmio mapping failsAlex Deucher2013-04-15
| | | | | | | | | | | If we fail to map the mmio BAR, skip driver tear down that requires mmio. Should fix: https://bugzilla.kernel.org/show_bug.cgi?id=56541 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon/evergreen+: don't enable HPD interrupts on eDP/LVDSAlex Deucher2013-04-15
| | | | | | | | | | Avoids potential interrupt storms when the display is disabled. May fix: https://bugzilla.kernel.org/show_bug.cgi?id=56041 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: add si tile mode array query v3Jerome Glisse2013-04-11
| | | | | | | | | | | Allow userspace to query for the tile mode array so userspace can properly compute surface pitch and alignment requirement depending on tiling. v2: Make strict aliasing safer by casting to char when copying v3: merge fix from Christian Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: add ring working queryChristian König2013-04-11
| | | | | | | | Add new ioctl option and bumb minor version number. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: handle broken disabled rb mask gracefullyAlex Deucher2013-04-11
| | | | | | | | | If the disabled rb mask register is not properly initialized program a sane default based on the number of RBs for the asic. This avoids a potential divide by 0 when calculating the backend mask. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: add pcie set/get lanes callbacks for newer asicsAlex Deucher2013-04-09
| | | | | | Uses the same functions as older asics. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: update r600 set/get pcie lane configAlex Deucher2013-04-09
| | | | | | Updated to the preferred programming sequence. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/kms: replace *REG32_PCIE_P with *REG32_PCIE_PORTAlex Deucher2013-04-09
| | | | | | Avoid confusion with the *REG32_P mask macro. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: remove unused blit remnants from si.cAlex Deucher2013-04-09
| | | | | | | We use the DMA ring rather than the GFX ring for bo moves. This code was never used and commented out. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: add UVD tiling addr config v2Christian König2013-04-09
| | | | | | | | v2: set UVD tiling config for rv730 Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com>