[PATCH 3/6] RADEONDownloadFromScreenCS: flush CS writes before mapping BO for read

xmail at karlt.net xmail at karlt.net
Wed Sep 1 15:53:22 PDT 2010


Michel Dänzer writes:

> On Mit, 2010-09-01 at 10:32 +1200, Karl Tomlinson wrote: 
>> Note that radeon_bo_get_src_domain() returns the write domain if
>> there is one.
>
> AFAICT it's kind of the other way around, it only returns the write
> domain if no read domain is specified.

I'm looking at radeon_cs_setup_bo:

        sc->new_accounted = (read_domains << 16) | write_domain;

which would make the least-significant bits the write_domain,
and

uint32_t radeon_bo_get_src_domain(struct radeon_bo *bo)
{
    struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
    uint32_t src_domain;

    src_domain = boi->space_accounted & 0xffff;
    if (!src_domain)
        src_domain = boi->space_accounted >> 16;

    return src_domain;
}

which returns the least-significant bits when set.

(IIUC, only read xor write get set anyway.)

> Maybe you're right though,

I hope so, but I appreciate your review.


More information about the xorg-driver-ati mailing list