From: "Christian König" <deathsimple@vodafone.de>
To: Alex Deucher <alexdeucher@gmail.com>, dri-devel@lists.freedesktop.org
Cc: Alex Deucher <alexander.deucher@amd.com>
Subject: Re: [PATCH 1/2] drm/radeon: skip async dma init on r6xx
Date: Mon, 27 Jan 2014 17:51:08 +0100 [thread overview]
Message-ID: <52E68E7C.2010306@vodafone.de> (raw)
In-Reply-To: <1390840535-23392-1-git-send-email-alexander.deucher@amd.com>
Am 27.01.2014 17:35, schrieb Alex Deucher:
> The hw is buggy and it's not currently used, but it's
> currently still initialized by the driver. Skip the init.
> Skipping init also seems to improve stability with dpm on
> some r6xx asics.
>
> bug:
> https://bugs.freedesktop.org/show_bug.cgi?id=66963
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
On the second patch we might want to add something like a general update
function for ring->enabled which automatically adjusts the available
VRAM if the engine for paging is enabled/disabled.
But that can wait for a separate patchset. Anyway both patches are:
Reviewed-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/radeon/r600.c | 27 +++++----------------------
> drivers/gpu/drm/radeon/radeon_cs.c | 2 +-
> 2 files changed, 6 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
> index 3dce370..4d69d17 100644
> --- a/drivers/gpu/drm/radeon/r600.c
> +++ b/drivers/gpu/drm/radeon/r600.c
> @@ -2612,6 +2612,11 @@ int r600_cp_resume(struct radeon_device *rdev)
> ring->ready = false;
> return r;
> }
> +
> + /* RV7xx+ uses dma for paging */
> + if (rdev->family < CHIP_RV770)
> + radeon_ttm_set_active_vram_size(rdev, rdev->mc.real_vram_size);
> +
> return 0;
> }
>
> @@ -2895,12 +2900,6 @@ static int r600_startup(struct radeon_device *rdev)
> return r;
> }
>
> - r = radeon_fence_driver_start_ring(rdev, R600_RING_TYPE_DMA_INDEX);
> - if (r) {
> - dev_err(rdev->dev, "failed initializing DMA fences (%d).\n", r);
> - return r;
> - }
> -
> /* Enable IRQ */
> if (!rdev->irq.installed) {
> r = radeon_irq_kms_init(rdev);
> @@ -2922,12 +2921,6 @@ static int r600_startup(struct radeon_device *rdev)
> if (r)
> return r;
>
> - ring = &rdev->ring[R600_RING_TYPE_DMA_INDEX];
> - r = radeon_ring_init(rdev, ring, ring->ring_size, R600_WB_DMA_RPTR_OFFSET,
> - DMA_PACKET(DMA_PACKET_NOP, 0, 0, 0));
> - if (r)
> - return r;
> -
> r = r600_cp_load_microcode(rdev);
> if (r)
> return r;
> @@ -2935,10 +2928,6 @@ static int r600_startup(struct radeon_device *rdev)
> if (r)
> return r;
>
> - r = r600_dma_resume(rdev);
> - if (r)
> - return r;
> -
> r = radeon_ib_pool_init(rdev);
> if (r) {
> dev_err(rdev->dev, "IB initialization failed (%d).\n", r);
> @@ -2997,7 +2986,6 @@ int r600_suspend(struct radeon_device *rdev)
> radeon_pm_suspend(rdev);
> r600_audio_fini(rdev);
> r600_cp_stop(rdev);
> - r600_dma_stop(rdev);
> r600_irq_suspend(rdev);
> radeon_wb_disable(rdev);
> r600_pcie_gart_disable(rdev);
> @@ -3077,9 +3065,6 @@ int r600_init(struct radeon_device *rdev)
> rdev->ring[RADEON_RING_TYPE_GFX_INDEX].ring_obj = NULL;
> r600_ring_init(rdev, &rdev->ring[RADEON_RING_TYPE_GFX_INDEX], 1024 * 1024);
>
> - rdev->ring[R600_RING_TYPE_DMA_INDEX].ring_obj = NULL;
> - r600_ring_init(rdev, &rdev->ring[R600_RING_TYPE_DMA_INDEX], 64 * 1024);
> -
> rdev->ih.ring_obj = NULL;
> r600_ih_ring_init(rdev, 64 * 1024);
>
> @@ -3092,7 +3077,6 @@ int r600_init(struct radeon_device *rdev)
> if (r) {
> dev_err(rdev->dev, "disabling GPU acceleration\n");
> r600_cp_fini(rdev);
> - r600_dma_fini(rdev);
> r600_irq_fini(rdev);
> radeon_wb_fini(rdev);
> radeon_ib_pool_fini(rdev);
> @@ -3109,7 +3093,6 @@ void r600_fini(struct radeon_device *rdev)
> radeon_pm_fini(rdev);
> r600_audio_fini(rdev);
> r600_cp_fini(rdev);
> - r600_dma_fini(rdev);
> r600_irq_fini(rdev);
> radeon_wb_fini(rdev);
> radeon_ib_pool_fini(rdev);
> diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
> index a8e3342..dfb5a1d 100644
> --- a/drivers/gpu/drm/radeon/radeon_cs.c
> +++ b/drivers/gpu/drm/radeon/radeon_cs.c
> @@ -138,7 +138,7 @@ static int radeon_cs_get_ring(struct radeon_cs_parser *p, u32 ring, s32 priority
> p->ring = R600_RING_TYPE_DMA_INDEX;
> else
> p->ring = CAYMAN_RING_TYPE_DMA1_INDEX;
> - } else if (p->rdev->family >= CHIP_R600) {
> + } else if (p->rdev->family >= CHIP_RV770) {
> p->ring = R600_RING_TYPE_DMA_INDEX;
> } else {
> return -EINVAL;
prev parent reply other threads:[~2014-01-27 16:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-27 16:35 [PATCH 1/2] drm/radeon: skip async dma init on r6xx Alex Deucher
2014-01-27 16:35 ` [PATCH 2/2] drm/radeon: clean up active vram sizing Alex Deucher
2014-01-27 16:51 ` Christian König [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52E68E7C.2010306@vodafone.de \
--to=deathsimple@vodafone.de \
--cc=alexander.deucher@amd.com \
--cc=alexdeucher@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.