lkml.org 
[lkml]   [2014]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.11 42/93] drm/radeon: don't allow RADEON_GEM_DOMAIN_CPU for command submission
    Date
    3.11.10.12 -stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= <marek.olsak@amd.com>

    commit ec65da385d46f63740c1c9230b891a6dcbd64c71 upstream.

    It hangs the hardware.

    Signed-off-by: Marek Olšák <marek.olsak@amd.com>
    Reviewed-by: Christian König <christian.koenig@amd.com>
    [ luis: backported to 3.11: adjusted context ]
    Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
    ---
    drivers/gpu/drm/radeon/radeon_cs.c | 6 ++++++
    1 file changed, 6 insertions(+)

    diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
    index 41b170d25c08..ff35fa18d7ed 100644
    --- a/drivers/gpu/drm/radeon/radeon_cs.c
    +++ b/drivers/gpu/drm/radeon/radeon_cs.c
    @@ -96,6 +96,12 @@ static int radeon_cs_parser_relocs(struct radeon_cs_parser *p)
    uint32_t domain = r->write_domain ?
    r->write_domain : r->read_domains;

    + if (domain & RADEON_GEM_DOMAIN_CPU) {
    + DRM_ERROR("RADEON_GEM_DOMAIN_CPU is not valid "
    + "for command submission\n");
    + return -EINVAL;
    + }
    +
    p->relocs[i].lobj.domain = domain;
    if (domain == RADEON_GEM_DOMAIN_VRAM)
    domain |= RADEON_GEM_DOMAIN_GTT;
    --
    1.9.1
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2014-06-23 16:41    [W:4.831 / U:0.048 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site