WIP: minigbm: using dri extensions [chromiumos/platform/minigbm : master]

122 views
Skip to first unread message

Satyajit Sahu (Gerrit)

unread,
Jan 12, 2018, 5:29:37 AM1/12/18
to chromium-...@chromium.org

Satyajit Sahu has uploaded this change for review.

View Change

WIP: minigbm: using dri extensions

addrlib dependency removed. dri extensions are called instead.
This patch is depedent on mesa CL:863268

Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
Signed-off-by: Satyajit <satyaj...@amd.com>
---
M Makefile
M amdgpu.c
A dri.c
A dri.h
M helpers.c
5 files changed, 419 insertions(+), 278 deletions(-)


To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromiumos/platform/minigbm
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
Gerrit-Change-Number: 863723
Gerrit-PatchSet: 1
Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>

Gurchetan Singh (Gerrit)

unread,
Jan 16, 2018, 7:38:37 PM1/16/18
to Satyajit Sahu

Is this ready to be reviewed?

View Change

    To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromiumos/platform/minigbm
    Gerrit-Branch: master
    Gerrit-MessageType: comment
    Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
    Gerrit-Change-Number: 863723
    Gerrit-PatchSet: 1
    Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
    Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Comment-Date: Wed, 17 Jan 2018 00:38:35 +0000
    Gerrit-HasComments: No
    Gerrit-HasLabels: No

    Satyajit Sahu (Gerrit)

    unread,
    Feb 5, 2018, 11:44:07 PM2/5/18
    to Dominik Behr, Gurchetan Singh

    Satyajit Sahu uploaded patch set #2 to this change.

    View Change

    WIP: minigbm: using dri extensions

    addrlib dependency removed. dri extensions are called instead.
    dri.c/dri.h implements the generic dri extensions call.
    amdgpu.c implements amdgpu specific.

    BUG=b:72972511
    TEST=Chrome booted to UI and verified basic use-cases


    Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
    Signed-off-by: Satyajit <satyaj...@amd.com>
    ---
    M Makefile
    M amdgpu.c
    A dri.c
    A dri.h
    4 files changed, 492 insertions(+), 273 deletions(-)

    To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromiumos/platform/minigbm
    Gerrit-Branch: master
    Gerrit-MessageType: newpatchset
    Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
    Gerrit-Change-Number: 863723
    Gerrit-PatchSet: 2
    Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Dominik Behr <db...@chromium.org>

    Gurchetan Singh (Gerrit)

    unread,
    Feb 7, 2018, 6:00:36 PM2/7/18
    to Satyajit Sahu, Deepak Sharma, Akshu Agrawal, Dominik Behr

    View Change

    9 comments:

    • Commit Message:

      • Patch Set #2, Line 7: WIP:

        Please remove this if this is ready for review.

      • Patch Set #2, Line 14: Chrome booted to UI and verified basic use-cases

        Please pass graphics_Gbm with this backend too. You can copy the test directly onto the DUT as well:

        scp /build/kahlee/usr/local/build/autotest/client/site_tests/graphics_Gbm/src/gbmtest root@IP1:/tmp/

        (on dut)

        /tmp/gbmtest

    • File amdgpu.c:

      • Patch Set #2, Line 65:

        nit: extraneous whitespace:

      • Patch Set #2, Line 92:

        	*bo_size = info.alloc_size;
        *base_align = info.phys_alignment;
        *tile_flags = info.metadata.tiling_info;

        The reason for this entire function seems to be to get the *bo_size. Can't you just do stride (returned from __DRI_IMAGE_ATTRIB_STRIDE) * height?

      • Patch Set #2, Line 107:

        malloc(sizeof(struct dri_driver_priv));
        memset(drv->priv, 0, sizeof(struct dri_driver_priv));

        calloc(1, sizeof(struct dri_driver_priv));

      • Patch Set #2, Line 195:

        		ret = dri_bo_create(bo, width, height, format, use_flags, &flink_name);
        if (flink_name) {
        amdgpu_get_gpu_info(drv_get_fd(bo->drv), flink_name, bo->sizes,
        &bo->tiling, &base_align);
        bo->total_size = bo->sizes[0];
        }
        }
        gem_create.in.bo_size = bo->total_size;
        gem_create.in.alignment = base_align;

        gem_create.in.domain_flags = 0;
        if (use_flags & (BO_USE_LINEAR | BO_USE_SW)) {
        gem_create.in.domain_flags |= AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED;
        bo->tiling = 1;
        }

        if (use_flags & (BO_USE_SCANOUT | BO_USE_CURSOR)) {
        /* TODO(dbehr) do not use VRAM after we enable display VM */
        gem_create.in.domains = AMDGPU_GEM_DOMAIN_VRAM;
        } else {
        gem_create.in.domains = AMDGPU_GEM_DOMAIN_GTT;
        if (!(use_flags & BO_USE_SW_READ_OFTEN))
        gem_create.in.domain_flags |= AMDGPU_GEM_CREATE_CPU_GTT_USWC;
        }

        /* Allocate the buffer with the preferred heap. */
        ret = drmCommandWriteRead(drv_get_fd(bo->drv), DRM_AMDGPU_GEM_CREATE,
        &gem_create, sizeof(gem_create));
        if (ret < 0)
        return ret;
        metadata.tiling_info = bo->tiling;

        for (size_t plane = 0; plane < bo->num_planes; plane++)
        bo->handles[plane].u32 = gem_create.out.handle;

        ret = amdgpu_set_metadata(drv_get_fd(bo->drv), bo->handles[0].u32, &metadata);

        I'm confused at what you're doing here. We call dri_bo_create, and then also call DRM_AMDGPU_GEM_CREATE. The dri backend should just call dri_bo_create, as it originally was in Nicolai's branch (https://cgit.freedesktop.org/~nh/minigbm/).

        If you want to use the GBM helpers for YUV buffers, and the DRI backend for normal buffers, that's fine too. But's not what you're doing here.

      • Patch Set #2, Line 248: if (bo->tiling == 1) {

        What does a tiling of 1 indicate? Can you use TILE_TYPE_NON_DISPLAYABLE in this case?

      • Patch Set #2, Line 249:

        		memset(&gem_map, 0, sizeof(gem_map));
        gem_map.in.handle = bo->handles[plane].u32;

        ret = drmIoctl(bo->drv->fd, DRM_IOCTL_AMDGPU_GEM_MMAP, &gem_map);
        if (ret) {
        fprintf(stderr, "drv: DRM_IOCTL_AMDGPU_GEM_MMAP failed\n");
        return MAP_FAILED;
        }
        vma->length = bo->total_size;
        vma->addr = mmap(0, bo->total_size, map_flags, MAP_SHARED,
        bo->drv->fd, gem_map.out.addr_ptr);
        return vma->addr;

        Why wouldn't the dri backend be able to handle this as well?

      • Patch Set #2, Line 298: .bo_map = amdgpu_map_bo,

        what about .bo_invalidate and .bo_flush? Nicolai seemed to indicate that was possible in his email. Will the __DRI2flushExtensionRec work in this case?

    To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromiumos/platform/minigbm
    Gerrit-Branch: master
    Gerrit-MessageType: comment
    Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
    Gerrit-Change-Number: 863723
    Gerrit-PatchSet: 2
    Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
    Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
    Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
    Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
    Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Comment-Date: Wed, 07 Feb 2018 23:00:26 +0000
    Gerrit-HasComments: Yes
    Gerrit-HasLabels: No

    Dominik Behr (Gerrit)

    unread,
    Feb 7, 2018, 8:00:49 PM2/7/18
    to Satyajit Sahu, Stéphane Marchesin, Gurchetan Singh, Deepak Sharma, Akshu Agrawal

    View Change

    3 comments:

      • What does a tiling of 1 indicate? Can you use TILE_TYPE_NON_DISPLAYABLE in this case?

      • I think it may be linear general or linear aligned and in this case simple mmap should give linear view. We should use enums here instead of number.

    • File dri.c:

      • Patch Set #2, Line 117: /* Version 13 for __DRI_IMAGE_ATTRIB_OFFSET */

        13 or 12?

      • Patch Set #2, Line 296:

        how is it possible that we do not have context here? it should be created in dri_init. And if dri_init has not been called how is it safe to call createNewContext()?

    To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromiumos/platform/minigbm
    Gerrit-Branch: master
    Gerrit-MessageType: comment
    Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
    Gerrit-Change-Number: 863723
    Gerrit-PatchSet: 2
    Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
    Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
    Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
    Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
    Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
    Gerrit-Comment-Date: Thu, 08 Feb 2018 01:00:47 +0000
    Gerrit-HasComments: Yes
    Gerrit-HasLabels: No

    Satyajit Sahu (Gerrit)

    unread,
    Feb 9, 2018, 12:22:36 AM2/9/18
    to Dominik Behr, Stéphane Marchesin, Gurchetan Singh, Deepak Sharma, Akshu Agrawal

    View Change

    11 comments:

      • Done

      • Patch Set #2, Line 92:

        	*bo_size = info.alloc_size;
        *base_align = info.phys_alignment;
        *tile_flags = info.metadata.tiling_info;

      • The reason for this entire function seems to be to get the *bo_size. […]

        This function also sets the tiling_flags and base_align value.

      • Patch Set #2, Line 107:

        malloc(sizeof(struct dri_driver_priv));
        memset(drv->priv, 0, sizeof(struct dri_driver_priv));

        calloc(1, sizeof(struct dri_driver_priv));

      • Done

      • I'm confused at what you're doing here. […]

        DRM_AMDGPU_GEM_CREATE is needed if flink_name is set. Next patch I'll take care of cleaning up of this part of the code.

      • I think it may be linear general or linear aligned and in this case simple mmap should give linear v […]

        Yes that's correct. Basically the tiling flag is overwritten to linear i.e. 1. enum might not help here as what should be the value of non linear?

      • Patch Set #2, Line 249:

        		memset(&gem_map, 0, sizeof(gem_map));
        gem_map.in.handle = bo->handles[plane].u32;

        ret = drmIoctl(bo->drv->fd, DRM_IOCTL_AMDGPU_GEM_MMAP, &gem_map);
        if (ret) {
        fprintf(stderr, "drv: DRM_IOCTL_AMDGPU_GEM_MMAP failed\n");
        return MAP_FAILED;
        }
        vma->length = bo->total_size;
        vma->addr = mmap(0, bo->total_size, map_flags, MAP_SHARED,
        bo->drv->fd, gem_map.out.addr_ptr);
        return vma->addr;

        Why wouldn't the dri backend be able to handle this as well?

      • for linear data only mmap should work instead of mesa's mapImage.

      • what about .bo_invalidate and .bo_flush? Nicolai seemed to indicate that was possible in his email. […]

        It should work. Not tried yet.

    • File dri.c:

      • Changing to 13

      • how is it possible that we do not have context here? it should be created in dri_init. […]

        this if case wont be hit at all. removing it.

    To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromiumos/platform/minigbm
    Gerrit-Branch: master
    Gerrit-MessageType: comment
    Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
    Gerrit-Change-Number: 863723
    Gerrit-PatchSet: 2
    Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
    Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
    Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
    Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
    Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
    Gerrit-Comment-Date: Fri, 09 Feb 2018 05:22:27 +0000
    Gerrit-HasComments: Yes
    Gerrit-HasLabels: No

    Satyajit Sahu (Gerrit)

    unread,
    Feb 9, 2018, 12:23:06 AM2/9/18
    to Dominik Behr, Stéphane Marchesin, Akshu Agrawal, Deepak Sharma, Gurchetan Singh

    Satyajit Sahu uploaded patch set #3 to this change.

    View Change

    minigbm: using dri extensions


    addrlib dependency removed. dri extensions are called instead.
    dri.c/dri.h implements the generic dri extensions call.
    amdgpu.c implements amdgpu specific.

    BUG=b:72972511
    TEST=Chrome booted to UI and passed graphics_Gbm autotest


    Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
    Signed-off-by: Satyajit <satyaj...@amd.com>
    ---
    M Makefile
    M amdgpu.c
    A dri.c
    A dri.h
    4 files changed, 501 insertions(+), 288 deletions(-)

    To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromiumos/platform/minigbm
    Gerrit-Branch: master
    Gerrit-MessageType: newpatchset
    Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
    Gerrit-Change-Number: 863723
    Gerrit-PatchSet: 3

    Satyajit Sahu (Gerrit)

    unread,
    Feb 9, 2018, 2:14:52 AM2/9/18
    to Dominik Behr, Stéphane Marchesin, Akshu Agrawal, Deepak Sharma, Gurchetan Singh

    Satyajit Sahu uploaded patch set #4 to this change.

    View Change

    minigbm: using dri extensions


    addrlib dependency removed. dri extensions are called instead.
    dri.c/dri.h implements the generic dri extensions call.
    amdgpu.c implements amdgpu specific.

    BUG=b:72972511
    TEST=Chrome booted to UI and passed graphics_Gbm autotest

    Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
    Signed-off-by: Satyajit <satyaj...@amd.com>
    ---
    M Makefile
    M amdgpu.c
    A dri.c
    A dri.h
    4 files changed, 501 insertions(+), 288 deletions(-)

    To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromiumos/platform/minigbm
    Gerrit-Branch: master
    Gerrit-MessageType: newpatchset
    Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
    Gerrit-Change-Number: 863723
    Gerrit-PatchSet: 4

    Gurchetan Singh (Gerrit)

    unread,
    Feb 9, 2018, 11:29:46 PM2/9/18
    to Satyajit Sahu, Dominik Behr, Stéphane Marchesin, Deepak Sharma, Akshu Agrawal
     

    View Change

    3 comments:

      • 		ret = dri_bo_create(bo, width, height, format, use_flags, &flink_name);
        if (flink_name) {

      • 			ret = amdgpu_get_gpu_info(drv_get_fd(bo->drv), flink_name,
        &bo->tiling, &base_align);
        if (ret)
        return ret;
        bo->strides[0] = ALIGN(bo->strides[0], 256);
        bo->total_size = bo->sizes[0] = bo->strides[0] * height;
        }
        }
        if (!bo->handles[0].u32) {


      • gem_create.in.bo_size = bo->total_size;
        gem_create.in.alignment = base_align;

        gem_create.in.domain_flags = 0;
        if (use_flags & (BO_USE_LINEAR | BO_USE_SW)) {
        gem_create.in.domain_flags |= AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED;

      • 			//set it to linear


      • bo->tiling = 1;
        }

        if (use_flags & (BO_USE_SCANOUT | BO_USE_CURSOR)) {
        /* TODO(dbehr) do not use VRAM after we enable display VM */
        gem_create.in.domains = AMDGPU_GEM_DOMAIN_VRAM;
        } else {
        gem_create.in.domains = AMDGPU_GEM_DOMAIN_GTT;
        if (!(use_flags & BO_USE_SW_READ_OFTEN))
        gem_create.in.domain_flags |= AMDGPU_GEM_CREATE_CPU_GTT_USWC;
        }

        /* Allocate the buffer with the preferred heap. */
        ret = drmCommandWriteRead(drv_get_fd(bo->drv), DRM_AMDGPU_GEM_CREATE,
        &gem_create, sizeof(gem_create));
        if (ret < 0)
        return ret;
        metadata.tiling_info = bo->tiling;

      • DRM_AMDGPU_GEM_CREATE is needed if flink_name is set. […]

        So all of this code is an error case if dri_bo_create fails?

        In my opinion, that's too complicated. We should expect drivers using the DRI backend to use the DRI backend successfully. If not, we can use return NULL, but having a complicated fallback path is unnecessary.

        Also IIRC, flink is considered insecure and that's why GEM is preferred. Also render node won't be able to use it (cros_gralloc). So just try get the handle from __DRI_IMAGE_ATTRIB_HANDLE and forget about flink.

      • static void *amdgpu_map_bo(struct bo *bo, struct vma *vma, size_t plane, uint32_t map_flags) {
        union drm_amdgpu_gem_mmap gem_map;
        int ret = 0;



      • if (bo->tiling == 1) {

      • 		memset(&gem_map, 0, sizeof(gem_map));
        gem_map.in.handle = bo->handles[plane].u32;

        ret = drmIoctl(bo->drv->fd, DRM_IOCTL_AMDGPU_GEM_MMAP, &gem_map);
        if (ret) {
        fprintf(stderr, "drv: DRM_IOCTL_AMDGPU_GEM_MMAP failed\n");
        return MAP_FAILE

      • for linear data only mmap should work instead of mesa's mapImage.

        If Mesa's mapImage can handle linear data, why not use that instead? The performance differences will be negligible.

      • Patch Set #2, Line 298: .init = amdgpu_init,

      • It should work. Not tried yet.

      • Well, now's a good time as ever to add it. The gbmtest should exercise that path.

    To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromiumos/platform/minigbm
    Gerrit-Branch: master
    Gerrit-MessageType: comment
    Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
    Gerrit-Change-Number: 863723
    Gerrit-PatchSet: 4
    Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
    Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
    Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
    Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
    Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
    Gerrit-Comment-Date: Sat, 10 Feb 2018 04:29:44 +0000
    Gerrit-HasComments: Yes
    Gerrit-HasLabels: No
    Gerrit-Comment-In-Reply-To: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Comment-In-Reply-To: Gurchetan Singh <gurchet...@chromium.org>

    Satyajit Sahu (Gerrit)

    unread,
    Feb 12, 2018, 3:34:42 AM2/12/18
    to Gurchetan Singh, Dominik Behr, Stéphane Marchesin, Deepak Sharma, Akshu Agrawal

    View Change

    3 comments:

      • So all of this code is an error case if dri_bo_create fails? […]

        dri_init-->createNewScreen-->amdgpu_device_initialize.

        amdgpu_device_initialize, if called with a fd pointing to a primary device (it is /dev/dri/card0 for us) which has been initialized earlier, then the previous amdgpu_device handle is returned and the new fd is stored in a variable named flink_fd.
        Here is the link to the code.
        https://cs.chromium.org/chromium/src/third_party/libdrm/src/amdgpu/amdgpu_device.c?l=209

        In our case createNewScreen seems to be called (may be from broswer) before minigbm init. So the amdgpu_device_handle we get, is not corresponding to drv->fd of minigbm.
        The gem handle returned by queryImage (__DRI_IMAGE_ATTRIB_HANDLE) is also not corresponding to the drv->fd. So a new gem_handle needs to be created. For that tiling info is needed. queryImage does not provide this data.

        To get the tiling info and base_alignment flink handle is used here. queryImage for __DRI_IMAGE_ATTRIB_NAME calles amdgpu_bo_export_flink of libdrm. Here is the link
        https://cs.chromium.org/chromium/src/third_party/libdrm/src/amdgpu/amdgpu_bo.c?l=183

        So flink is not an error case here. We are using gem_handle only, flink is used just to get tiling info.

      • Patch Set #2, Line 249:

        static void *amdgpu_map_bo(struct bo *bo, struct vma *vma, size_t plane, uint32_t map_flags) {
        union drm_amdgpu_gem_mmap gem_map;
        int ret = 0;

        if (bo->tiling == 1) {
        memset(&gem_map, 0, sizeof(gem_map));
        gem_map.in.handle = bo->handles[plane].u32;

        ret = drmIoctl(bo->drv->fd, DRM_IOCTL_AMDGPU_GEM_MMAP, &gem_map);
        if (ret) {
        fprintf(stderr, "drv: DRM_IOCTL_AMDGPU_GEM_MMAP failed\n");
        return MAP_FAILE

      • If Mesa's mapImage can handle linear data, why not use that instead? The performance differences wi […]

        I did a quick try for the same. When ran mmap_test -g the output is garbled. I need to look into the issue. We will open a separate bug for the same.

      • Well, now's a good time as ever to add it. The gbmtest should exercise that path.

        Can this be taken as a separate feature.

    To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromiumos/platform/minigbm
    Gerrit-Branch: master
    Gerrit-MessageType: comment
    Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
    Gerrit-Change-Number: 863723
    Gerrit-PatchSet: 4
    Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
    Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
    Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
    Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
    Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
    Gerrit-Comment-Date: Mon, 12 Feb 2018 08:34:30 +0000

    Gurchetan Singh (Gerrit)

    unread,
    Feb 12, 2018, 7:12:07 PM2/12/18
    to Satyajit Sahu, Dominik Behr, Stéphane Marchesin, Deepak Sharma, Akshu Agrawal

    View Change

    4 comments:

    • Commit Message:

      • Patch Set #2, Line 14: Chrome booted to UI and passed graphics_Gbm auto

        graphics_Gbm passes after a small change in the autotest. Here is the patch […]

        You also need to verify the Android container still boots with this patch. Also, I recommend you start the youtube app to verify video playback. Here are the instructions:

        cros_workon --board=kahlee start arc-cros-gralloc
        emerge-kahlee arc-cros-gralloc
        sh ~/trunk/src/private-overlays/project-cheets-private/scripts/deploy_vendor_image.sh $IP

    • File amdgpu.c:

      • dri_init-->createNewScreen-->amdgpu_device_initialize. […]

        You use .base_align and bo->tiling as inputs to DRM_AMDGPU_GEM_CREATE and DRM_AMDGPU_GEM_METADATA, respectively.

        Why are you calling DRM_AMDGPU_GEM_CREATE when dri_bo_create (specifically, dri->image_extension->createImage) is already supposed to create the buffer?

        You seem to only use the tiling in amdgpu_map_bo. Why don't you just say it's TILE_MODE_2D_TILED when we call dri_bo_create? Why are you fishing for the exact tiling via flink if we don't really need to know (since the dri extension knows)?

      • Patch Set #2, Line 249:

        static void *amdgpu_map_bo(struct bo *bo, struct vma *vma, size_t plane, uint32_t map_flags) {
        union drm_amdgpu_gem_mmap gem_map;
        int ret = 0;

        if (bo->tiling == 1) {
        memset(&gem_map, 0, sizeof(gem_map));
        gem_map.in.handle = bo->handles[plane].u32;

        ret = drmIoctl(bo->drv->fd, DRM_IOCTL_AMDGPU_GEM_MMAP, &gem_map);
        if (ret) {
        fprintf(stderr, "drv: DRM_IOCTL_AMDGPU_GEM_MMAP failed\n");
        return MAP_FAILE

      • I did a quick try for the same. When ran mmap_test -g the output is garbled. […]

        The easiest case for mapImage is linear data. I'd bet the bug is probably in this patch rather than Mesa, since it's the newest and least tested.

      • Can this be taken as a separate feature.

        No. Without invalidate/flush, the tiling will still be incorrect for certain tests.

    To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromiumos/platform/minigbm
    Gerrit-Branch: master
    Gerrit-MessageType: comment
    Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
    Gerrit-Change-Number: 863723
    Gerrit-PatchSet: 4
    Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
    Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
    Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
    Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
    Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
    Gerrit-Comment-Date: Tue, 13 Feb 2018 00:12:05 +0000

    Dominik Behr (Gerrit)

    unread,
    Feb 13, 2018, 4:15:54 PM2/13/18
    to Satyajit Sahu, Gurchetan Singh, Stéphane Marchesin, Deepak Sharma, Akshu Agrawal

    View Change

    1 comment:

    • File amdgpu.c:

      • Patch Set #2, Line 248: if (bo->tiling == 1) {

        Yes that's correct. Basically the tiling flag is overwritten to linear i.e. 1. […]

        You already define some tile modes
        #define TILE_MODE_LINEAR 0
        #define TILE_MODE_2D_TILED 4
        shouldnt we have TILE_MODE_LINEAR_ALIGNED 1 and use it?
        Also, doesnt this case also apply to bo->tiling == 0?

    To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromiumos/platform/minigbm
    Gerrit-Branch: master
    Gerrit-MessageType: comment
    Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
    Gerrit-Change-Number: 863723
    Gerrit-PatchSet: 2
    Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
    Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
    Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
    Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
    Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
    Gerrit-Comment-Date: Tue, 13 Feb 2018 21:15:52 +0000
    Gerrit-HasComments: Yes
    Gerrit-HasLabels: No
    Gerrit-Comment-In-Reply-To: Dominik Behr <db...@chromium.org>

    Satyajit Sahu (Gerrit)

    unread,
    Feb 14, 2018, 5:40:30 AM2/14/18
    to Dominik Behr, Gurchetan Singh, Stéphane Marchesin, Deepak Sharma, Akshu Agrawal

    View Change

    5 comments:

      • You use . […]

        The gem_handle obtained from queryImage is not corresponding to the drv->fd. If the bo->handle is directly set to the gem_handle, UI fails with below error.
        ERROR:gbm_buffer.cc(206)] Failed to export buffer to dma_buf: No such file or directory (2)

        After new gem_handle is created and the proper tiling flag are set then UI is proper.

        Tiling flags are needed to be set on gem handle to get the proper UI.

      • You already define some tile modes […]

        Yes, this can be done. Currently mesa's mapImage for linear data is having some issue. Working on that. Once that is fixed this part of the code can be removed.

      • static void *amdgpu_map_bo(struct bo *bo, struct vma *vma, size_t plane, uint32_t map_flags) {
        union drm_amdgpu_gem_mmap gem_map;
        int ret = 0;

      • 	if (bo->tiling == 1) {

      • 		memset(&gem_map, 0, sizeof(gem_map));
        gem_map.in.handle = bo->handles[plane].u32;

        ret = drmIoctl(bo->drv->fd, DRM_IOCTL_AMDGPU_GEM_MMAP, &gem_map);
        if (ret) {
        fprintf(stderr, "drv: DRM_IOCTL_AMDGPU_GEM_MMAP failed\n");
        return MAP_FAILE

      • The easiest case for mapImage is linear data. […]

        I dumped the mapped data in mmap_test.c. Only the first two frames are corrupted the other frames are proper. I am looking into this issue.

      • No. Without invalidate/flush, the tiling will still be incorrect for certain tests.

        Ok. I'll add invalidate and flush.

    To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromiumos/platform/minigbm
    Gerrit-Branch: master
    Gerrit-MessageType: comment
    Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
    Gerrit-Change-Number: 863723
    Gerrit-PatchSet: 4
    Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
    Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
    Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
    Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
    Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
    Gerrit-Comment-Date: Wed, 14 Feb 2018 10:40:23 +0000

    Gurchetan Singh (Gerrit)

    unread,
    Feb 14, 2018, 1:26:48 PM2/14/18
    to Satyajit Sahu, Dominik Behr, Stéphane Marchesin, Deepak Sharma, Akshu Agrawal

    View Change

    2 comments:

      • I have verified youtube. […]

        Test Android sooner rather than later. I'm pretty sure the DRI_PATH ("/usr/lib64/dri/radeonsi_dri.so") is not present in the container (it'll be "/vendor/lib64/radeon_si.so"). You'll have to figure how to make it work for both cases.

    • File amdgpu.c:

      • But you're allocating two GEM buffers -- one from createImage and one from DRM_AMDGPU_GEM_CREATE. That's not desirable.

      • The gem_handle obtained from queryImage is not corresponding to the drv->fd.

      • You can query __DRI_IMAGE_ATTRIB_FD and then do drmPrimeHandleToFd into drv->fd when you're creating.

    To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromiumos/platform/minigbm
    Gerrit-Branch: master
    Gerrit-MessageType: comment
    Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
    Gerrit-Change-Number: 863723
    Gerrit-PatchSet: 4
    Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
    Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
    Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
    Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
    Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
    Gerrit-Comment-Date: Wed, 14 Feb 2018 18:26:46 +0000
    Gerrit-HasComments: Yes
    Gerrit-HasLabels: No

    Gurchetan Singh (Gerrit)

    unread,
    Feb 14, 2018, 7:24:11 PM2/14/18
    to Satyajit Sahu, Dominik Behr, Stéphane Marchesin, Deepak Sharma, Akshu Agrawal

    Also,

    View Change

    1 comment:

    • File dri.c:

      • Patch Set #4, Line 124: drv_get_fd(drv),

        Also, why is the gem namespace of the DRI screen/context different from the minigbm one? We call createNewScreen2 with the minigbm fd (drv_get_fd(drv)).

    To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromiumos/platform/minigbm
    Gerrit-Branch: master
    Gerrit-MessageType: comment
    Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
    Gerrit-Change-Number: 863723
    Gerrit-PatchSet: 4
    Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
    Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
    Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
    Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
    Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
    Gerrit-Comment-Date: Thu, 15 Feb 2018 00:24:06 +0000
    Gerrit-HasComments: Yes
    Gerrit-HasLabels: No

    Satyajit Sahu (Gerrit)

    unread,
    Feb 16, 2018, 6:57:32 AM2/16/18
    to Gurchetan Singh, Dominik Behr, Stéphane Marchesin, Deepak Sharma, Akshu Agrawal

    View Change

    1 comment:

      • But you're allocating two GEM buffers -- one from createImage and one from DRM_AMDGPU_GEM_CREATE. […]

        After modify gbm_bo_get_fd to return prime fd handle return by queryImage __DRI_IMAGE_ATTRIB_FD, the browser (i.e. Failed to export buffer to dma_buf) is fixed. Now I dont see any error in /var/log/ui/ui.LATEST.
        But still UI crashes. Debugging further.

    To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromiumos/platform/minigbm
    Gerrit-Branch: master
    Gerrit-MessageType: comment
    Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
    Gerrit-Change-Number: 863723
    Gerrit-PatchSet: 4
    Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
    Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
    Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
    Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
    Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
    Gerrit-Comment-Date: Fri, 16 Feb 2018 11:57:29 +0000
    Gerrit-HasComments: Yes
    Gerrit-HasLabels: No

    Satyajit Sahu (Gerrit)

    unread,
    Feb 20, 2018, 6:49:36 AM2/20/18
    to Gurchetan Singh, Dominik Behr, Stéphane Marchesin, Deepak Sharma, Akshu Agrawal

    View Change

    1 comment:

      • After modify gbm_bo_get_fd to return prime fd handle return by queryImage __DRI_IMAGE_ATTRIB_FD, the […]

        The browser failure was because of mmap failure. mmap was failing with error 13 (permission denied).
        queryImage for __DRI_IMAGE_ATTRIB_FD calls amdgpu_bo_export of libdrm. In amdgpu_bo_export drmPrimeHandleToFD DRM_RDWR flag is not there. Because of this mmap fails for the returned prime_fd.
        https://cs.chromium.org/chromium/src/third_party/libdrm/src/amdgpu/amdgpu_bo.c?l=253

        After adding DRM_RDWR flag, UI comes up.

    To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromiumos/platform/minigbm
    Gerrit-Branch: master
    Gerrit-MessageType: comment
    Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
    Gerrit-Change-Number: 863723
    Gerrit-PatchSet: 4
    Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
    Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
    Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
    Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
    Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
    Gerrit-Comment-Date: Tue, 20 Feb 2018 11:49:30 +0000

    Satyajit Sahu (Gerrit)

    unread,
    Feb 27, 2018, 5:43:28 AM2/27/18
    to Drew Davenport, Gurchetan Singh, Dominik Behr, Stéphane Marchesin, Deepak Sharma, Akshu Agrawal

    View Change

    3 comments:

      • Test Android sooner rather than later. I'm pretty sure the DRI_PATH ("/usr/lib64/dri/radeonsi_dri. […]

        arc-cros-gralloc build is failing due to missing GL headers in android container. arc-mesa is not exporting the GL headers to android container. I have raised a separate bug for this.

    • File amdgpu.c:

      • Patch Set #2, Line 249:

        static void *amdgpu_map_bo(struct bo *bo, struct vma *vma, size_t plane, uint32_t map_flags) {
        union drm_amdgpu_gem_mmap gem_map;
        int ret = 0;

        if (bo->tiling == 1) {
        memset(&gem_map, 0, sizeof(gem_map));
        gem_map.in.handle = bo->handles[plane].u32;

        ret = drmIoctl(bo->drv->fd, DRM_IOCTL_AMDGPU_GEM_MMAP, &gem_map);
        if (ret) {
        fprintf(stderr, "drv: DRM_IOCTL_AMDGPU_GEM_MMAP failed\n");
        return MAP_FAILE

      • I dumped the mapped data in mmap_test.c. […]

        gbm_bo_unmap was calling drv_bo_flush instead of drv_bo_unmap. After changing it to call unmap and adding flush after unmap, now mmap_test -g is proper.

    To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromiumos/platform/minigbm
    Gerrit-Branch: master
    Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
    Gerrit-Change-Number: 863723
    Gerrit-PatchSet: 4
    Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
    Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
    Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
    Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
    Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
    Gerit-CC: Drew Davenport <ddave...@chromium.org>
    Gerrit-Comment-Date: Tue, 27 Feb 2018 10:43:23 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Satyajit Sahu <satyaj...@amd.com>
    Comment-In-Reply-To: Gurchetan Singh <gurchet...@chromium.org>
    Gerrit-MessageType: comment

    Satyajit Sahu (Gerrit)

    unread,
    Feb 27, 2018, 5:43:53 AM2/27/18
    to Dominik Behr, Stéphane Marchesin, Akshu Agrawal, Deepak Sharma, Gurchetan Singh, Drew Davenport

    Satyajit Sahu uploaded patch set #5 to this change.

    View Change

    minigbm: using dri extensions


    addrlib dependency removed. dri extensions are called instead.
    dri.c/dri.h implements the generic dri extensions call.
    amdgpu.c implements amdgpu specific.

    BUG=b:72972511
    TEST=Chrome booted to UI and passed graphics_Gbm autotest


    Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
    Signed-off-by: Satyajit <satyaj...@amd.com>
    ---
    M Makefile
    M amdgpu.c
    A dri.c
    A dri.h
    M gbm.c
    5 files changed, 495 insertions(+), 302 deletions(-)

    To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromiumos/platform/minigbm
    Gerrit-Branch: master
    Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
    Gerrit-Change-Number: 863723
    Gerrit-PatchSet: 5
    Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
    Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
    Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
    Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
    Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
    Gerit-CC: Drew Davenport <ddave...@chromium.org>
    Gerrit-MessageType: newpatchset

    Gurchetan Singh (Gerrit)

    unread,
    Feb 27, 2018, 11:47:48 PM2/27/18
    to Satyajit Sahu, Drew Davenport, Dominik Behr, Stéphane Marchesin, Deepak Sharma, Akshu Agrawal

    View Change

    5 comments:

    • Commit Message:

      • Patch Set #2, Line 14: Chrome booted to UI and passed graphics_Gbm auto

        arc-cros-gralloc build is failing due to missing GL headers in android container. […]

        This needs to be fixed before this patch can land. We don't want to break the Kahlee build.

    • File amdgpu.c:

      • 	case DRM_FORMAT_FLEX_YCbCr_420_888:
        return DRM_FORMAT_NV12;
        default:
        return format;
        }
        }

        const struct backend backend_amdgpu = {
        .name = "amdgpu",
        .init = amdgpu_init,
        .close = amdgpu_close,
        .bo_create = amdgp

        gbm_bo_unmap was calling drv_bo_flush instead of drv_bo_unmap. […]

        That's the desired behavior. Doing flush instead of unmap works on all other platforms. You need to add a flush implementation.

      • Patch Set #2, Line 267:

        Please use enum.

    • File amdgpu.c:

    To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromiumos/platform/minigbm
    Gerrit-Branch: master
    Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
    Gerrit-Change-Number: 863723
    Gerrit-PatchSet: 5
    Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
    Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
    Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
    Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
    Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
    Gerit-CC: Drew Davenport <ddave...@chromium.org>
    Gerrit-Comment-Date: Wed, 28 Feb 2018 04:47:46 +0000

    Satyajit Sahu (Gerrit)

    unread,
    Feb 27, 2018, 11:58:46 PM2/27/18
    to Gurchetan Singh, Drew Davenport, Dominik Behr, Stéphane Marchesin, Deepak Sharma, Akshu Agrawal

    View Change

    5 comments:

      • This needs to be fixed before this patch can land. We don't want to break the Kahlee build.

        I have opened a new bug for this. I am working on it.

    • File amdgpu.c:

      • Removed in Patch #5

      • Patch Set #2, Line 249:

        	case DRM_FORMAT_FLEX_YCbCr_420_888:
        return DRM_FORMAT_NV12;
        default:
        return format;
        }
        }

        const struct backend backend_amdgpu = {
        .name = "amdgpu",
        .init = amdgpu_init,
        .close = amdgpu_close,
        .bo_create = amdgp

      • That's the desired behavior. Doing flush instead of unmap works on all other platforms. […]

        I'll implement flush and check.

      • Done

    To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromiumos/platform/minigbm
    Gerrit-Branch: master
    Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
    Gerrit-Change-Number: 863723
    Gerrit-PatchSet: 5
    Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
    Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
    Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
    Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
    Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
    Gerit-CC: Drew Davenport <ddave...@chromium.org>
    Gerrit-Comment-Date: Wed, 28 Feb 2018 04:58:40 +0000

    Gurchetan Singh (Gerrit)

    unread,
    Mar 1, 2018, 12:12:33 PM3/1/18
    to Satyajit Sahu, Drew Davenport, Dominik Behr, Stéphane Marchesin, Deepak Sharma, Akshu Agrawal

    View Change

    6 comments:

    • File dri.c:

      • Patch Set #5, Line 35:

        	int prime_fd;

        we already have a field in the struct bo for the prime_fd. No need to duplicate.

      • Patch Set #5, Line 213:

        	}
        ret = drmPrimeFDToHandle(bo->drv->fd, bo_dri->prime_fd, (uint32_t*)&bo_handle);
        if (ret)
        fprintf(stderr, "drmPrimeFDToHandle in %s failed ret %d\n",
        __func__, ret);

        close the prime_fd after using it.

      • Patch Set #5, Line 266:

        			&bo_dri->prime_fd))

        close prime_fd after using it.

      • Patch Set #5, Line 289:

        		if (bo_dri->prime_fd >= 0) {
        close(bo_dri->prime_fd);
        }

        not needed here.

      • Patch Set #5, Line 333: dri->image_extension->unmapImage(dri->context, bo_dri->image, vma->priv);

        Check return value and propagate.

      • Patch Set #5, Line 334:

        	dri->flush_extension->flush_with_flags(dri->context, NULL, __DRI2_FLUSH_CONTEXT, 0);

        you need to implement bo_flush callback (amdgpu_bo_flush) and make that call dri->flush_extension->flush_with_flags(dri->context, NULL, __DRI2_FLUSH_CONTEXT, 0). Dont unmap the image before flushing.

    To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromiumos/platform/minigbm
    Gerrit-Branch: master
    Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
    Gerrit-Change-Number: 863723
    Gerrit-PatchSet: 5
    Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
    Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
    Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
    Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
    Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
    Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
    Gerit-CC: Drew Davenport <ddave...@chromium.org>
    Gerrit-Comment-Date: Thu, 01 Mar 2018 17:12:30 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    Gurchetan Singh (Gerrit)

    unread,
    Mar 1, 2018, 12:21:59 PM3/1/18
    to Satyajit Sahu, Drew Davenport, Dominik Behr, Stéphane Marchesin, Deepak Sharma, Akshu Agrawal

    Also can you run ./presubmit.sh. That'll make this patch follow our clang-format rules.

    View Change

      To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromiumos/platform/minigbm
      Gerrit-Branch: master
      Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
      Gerrit-Change-Number: 863723
      Gerrit-PatchSet: 5
      Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
      Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
      Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
      Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
      Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
      Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
      Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
      Gerit-CC: Drew Davenport <ddave...@chromium.org>
      Gerrit-Comment-Date: Thu, 01 Mar 2018 17:21:57 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: No
      Gerrit-MessageType: comment

      Satyajit Sahu (Gerrit)

      unread,
      Mar 1, 2018, 11:50:13 PM3/1/18
      to Gurchetan Singh, Drew Davenport, Dominik Behr, Stéphane Marchesin, Deepak Sharma, Akshu Agrawal

      View Change

      6 comments:

        • Patch Set #5, Line 35:

          	int prime_fd;

          we already have a field in the struct bo for the prime_fd. No need to duplicate.

        • struct bo doesnt have a field for prime_fd.

        • Patch Set #5, Line 213:

          	}
          ret = drmPrimeFDToHandle(bo->drv->fd, bo_dri->prime_fd, (uint32_t*)&bo_handle);
          if (ret)
          fprintf(stderr, "drmPrimeFDToHandle in %s failed ret %d\n",
          __func__, ret);

          close the prime_fd after using it.

        • I'll modify it to a local variable and close it after using.

        • I'll modify it to a local variable and close it after using.

        • Done

        • Patch Set #5, Line 333: dri->image_extension->unmapImage(dri->context, bo_dri->image, vma->priv);

          Check return value and propagate.

        • Done

        • you need to implement bo_flush callback (amdgpu_bo_flush) and make that call dri->flush_extension->f […]

          I did try that, but with only flush (without unmap) still see the garbled output for mmap_test -g.

      To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromiumos/platform/minigbm
      Gerrit-Branch: master
      Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
      Gerrit-Change-Number: 863723
      Gerrit-PatchSet: 5
      Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
      Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
      Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
      Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
      Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
      Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
      Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
      Gerit-CC: Drew Davenport <ddave...@chromium.org>
      Gerrit-Comment-Date: Fri, 02 Mar 2018 04:50:08 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No

      Gurchetan Singh (Gerrit)

      unread,
      Mar 2, 2018, 11:40:46 PM3/2/18
      to Satyajit Sahu, Drew Davenport, Dominik Behr, Stéphane Marchesin, Deepak Sharma, Akshu Agrawal

      Looking better and better. Here's what remains, for those keeping track:

      1) arc-cros-gralloc needs to build with this patch, Android needs to boot.
      2) flush_with_flags needs to be implemented.
      3) various coding nits.

      View Change

      1 comment:

        • 	dri->flush_extension->flush_with_flags(dri->context, NULL, __DRI2_FLUSH_CONTEXT, 0);

        • I did try that, but with only flush (without unmap) still see the garbled output for mmap_test -g.

        • It seems amdgpu doesn't implement the flush_with_flags callback. To verify this, run:

          grep -r "flush_with_flags" .

          in a Mesa source tree. Can you communicate to AMD Mesa engineers the desire to implement this? According to my prior conversation with Nicolai, this should be possible and not too difficult.

      To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromiumos/platform/minigbm
      Gerrit-Branch: master
      Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
      Gerrit-Change-Number: 863723
      Gerrit-PatchSet: 5
      Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
      Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
      Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
      Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
      Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
      Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
      Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
      Gerit-CC: Drew Davenport <ddave...@chromium.org>
      Gerrit-Comment-Date: Sat, 03 Mar 2018 04:40:43 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Satyajit Sahu <satyaj...@amd.com>

      Satyajit Sahu (Gerrit)

      unread,
      Mar 20, 2018, 4:58:58 AM3/20/18
      to Dominik Behr, Stéphane Marchesin, Akshu Agrawal, Deepak Sharma, Gurchetan Singh, Drew Davenport

      Satyajit Sahu uploaded patch set #6 to this change.

      View Change

      minigbm: using dri extensions


      addrlib dependency removed. dri extensions are called instead.
      dri.c/dri.h implements the generic dri extensions call.
      amdgpu.c implements amdgpu specific.

      BUG=b:72972511
      TEST=Chrome booted to UI and passed graphics_Gbm autotest
      CQ-DEPEND=CL:970222


      Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
      Signed-off-by: Satyajit <satyaj...@amd.com>
      ---
      M Makefile
      M amdgpu.c
      A dri.c
      A dri.h
      4 files changed, 512 insertions(+), 298 deletions(-)

      To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromiumos/platform/minigbm
      Gerrit-Branch: master
      Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
      Gerrit-Change-Number: 863723
      Gerrit-PatchSet: 6
      Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
      Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
      Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
      Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
      Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
      Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
      Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
      Gerrit-CC: Drew Davenport <ddave...@chromium.org>
      Gerrit-MessageType: newpatchset

      Satyajit Sahu (Gerrit)

      unread,
      Mar 20, 2018, 5:04:30 AM3/20/18
      to Gurchetan Singh, Drew Davenport, Dominik Behr, Stéphane Marchesin, Deepak Sharma, Akshu Agrawal

      Patch Set 5:

      (1 comment)

      Looking better and better. Here's what remains, for those keeping track:

      1) arc-cros-gralloc needs to build with this patch, Android needs to boot.
           Verified android (play store) with new patch.

      2) flush_with_flags needs to be implemented.
           We are implementing the missing features in mesa.
      3) various coding nits.

      View Change

        To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromiumos/platform/minigbm
        Gerrit-Branch: master
        Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
        Gerrit-Change-Number: 863723
        Gerrit-PatchSet: 6
        Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
        Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
        Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
        Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
        Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
        Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
        Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
        Gerrit-CC: Drew Davenport <ddave...@chromium.org>
        Gerrit-Comment-Date: Tue, 20 Mar 2018 09:04:27 +0000

        Satyajit Sahu (Gerrit)

        unread,
        Mar 20, 2018, 6:11:06 AM3/20/18
        to Dominik Behr, Stéphane Marchesin, Akshu Agrawal, Deepak Sharma, Gurchetan Singh, Drew Davenport

        Satyajit Sahu uploaded patch set #7 to this change.

        View Change

        minigbm: using dri extensions

        addrlib dependency removed. dri extensions are called instead.
        dri.c/dri.h implements the generic dri extensions call.
        amdgpu.c implements amdgpu specific.

        BUG=b:72972511
        TEST=Chrome booted to UI and passed graphics_Gbm autotest
        CQ-DEPEND=CL:970222

        Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
        Signed-off-by: Satyajit <satyaj...@amd.com>
        ---
        M Makefile
        M amdgpu.c
        A dri.c
        A dri.h
        4 files changed, 519 insertions(+), 302 deletions(-)

        To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromiumos/platform/minigbm
        Gerrit-Branch: master
        Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
        Gerrit-Change-Number: 863723
        Gerrit-PatchSet: 7
        Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
        Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
        Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
        Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
        Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
        Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
        Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
        Gerrit-CC: Drew Davenport <ddave...@chromium.org>
        Gerrit-MessageType: newpatchset

        Gurchetan Singh (Gerrit)

        unread,
        Mar 20, 2018, 8:12:19 PM3/20/18
        to Satyajit Sahu, Drew Davenport, Dominik Behr, Stéphane Marchesin, Deepak Sharma, Akshu Agrawal
             We are implementing the missing features in mesa.


        Implement those first, and then we can land this.

        View Change

        12 comments:

        To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromiumos/platform/minigbm
        Gerrit-Branch: master
        Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
        Gerrit-Change-Number: 863723
        Gerrit-PatchSet: 7
        Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
        Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
        Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
        Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
        Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
        Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
        Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
        Gerrit-CC: Drew Davenport <ddave...@chromium.org>
        Gerrit-Comment-Date: Wed, 21 Mar 2018 00:12:16 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Gerrit-MessageType: comment

        Satyajit Sahu (Gerrit)

        unread,
        Mar 22, 2018, 2:17:18 AM3/22/18
        to Gurchetan Singh, Drew Davenport, Dominik Behr, Stéphane Marchesin, Deepak Sharma, Akshu Agrawal

        Patch Set 7:

        (12 comments)

             We are implementing the missing features in mesa.


        Implement those first, and then we can land this.

        This is work in progress.

        View Change

        12 comments:

          • ifdef __ANDROID__ should work fine (the Android cross-compiler seems to define it): […]

            Done

        • File dri.h:

          • remove this and #include "drv. […]

            Done

          • Done

          • Done

          • strcmp is used inside lookup_extension

          • required for MAP_FAILED

          • you don't need this. You just set: […]

            Done

          • Done

          • Done

          • Done

          • Patch Set #7, Line 322:

            vma->addr = dri->image_extension->mapImage(
            dri->context, bo_dri->image,
            0, 0, bo->width, bo->height, /* rectangle to map */
            map_flags, /* GBM flags and DRI flags are the same */
            &stride, &vma->priv);

            the formatting looks weird. Make sure to ./presubmit.sh to get the proper formating.

          • Done

        To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromiumos/platform/minigbm
        Gerrit-Branch: master
        Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
        Gerrit-Change-Number: 863723
        Gerrit-PatchSet: 7
        Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
        Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
        Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
        Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
        Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
        Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
        Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
        Gerrit-CC: Drew Davenport <ddave...@chromium.org>
        Gerrit-Comment-Date: Thu, 22 Mar 2018 06:17:12 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No

        Satyajit Sahu (Gerrit)

        unread,
        Mar 22, 2018, 2:17:32 AM3/22/18
        to Dominik Behr, Stéphane Marchesin, Akshu Agrawal, Deepak Sharma, Gurchetan Singh, Drew Davenport

        Satyajit Sahu uploaded patch set #8 to this change.

        View Change

        minigbm: using dri extensions

        addrlib dependency removed. dri extensions are called instead.
        dri.c/dri.h implements the generic dri extensions call.
        amdgpu.c implements amdgpu specific.

        BUG=b:72972511
        TEST=Chrome booted to UI and passed graphics_Gbm autotest
        CQ-DEPEND=CL:970222

        Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
        Signed-off-by: Satyajit <satyaj...@amd.com>
        ---
        M Makefile
        M amdgpu.c
        A dri.c
        A dri.h
        4 files changed, 489 insertions(+), 303 deletions(-)

        To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromiumos/platform/minigbm
        Gerrit-Branch: master
        Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
        Gerrit-Change-Number: 863723
        Gerrit-PatchSet: 8
        Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
        Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
        Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
        Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
        Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
        Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
        Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
        Gerrit-CC: Drew Davenport <ddave...@chromium.org>
        Gerrit-MessageType: newpatchset

        Gurchetan Singh (Gerrit)

        unread,
        Mar 27, 2018, 1:36:53 PM3/27/18
        to Satyajit Sahu, Dominik Behr, Stéphane Marchesin, Akshu Agrawal, Deepak Sharma, Drew Davenport

        Gurchetan Singh uploaded patch set #9 to the change originally created by Satyajit Sahu.

        View Change

        minigbm: using dri extensions

        addrlib dependency removed. dri extensions are called instead.
        dri.c/dri.h implements the generic dri extensions call.
        amdgpu.c implements amdgpu specific.

        BUG=b:72972511
        TEST=Chrome booted to UI and passed graphics_Gbm autotest
        CQ-DEPEND=CL:970222

        Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
        Signed-off-by: Satyajit <satyaj...@amd.com>
        ---
        M Makefile
        M amdgpu.c
        A dri.c
        A dri.h
        4 files changed, 426 insertions(+), 326 deletions(-)

        To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromiumos/platform/minigbm
        Gerrit-Branch: master
        Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
        Gerrit-Change-Number: 863723
        Gerrit-PatchSet: 9

        Gurchetan Singh (Gerrit)

        unread,
        Mar 27, 2018, 1:40:23 PM3/27/18
        to Satyajit Sahu, Dominik Behr, Stéphane Marchesin, Akshu Agrawal, Deepak Sharma, Drew Davenport

        Gurchetan Singh uploaded patch set #10 to the change originally created by Satyajit Sahu.

        View Change

        minigbm: using dri extensions

        addrlib dependency removed. dri extensions are called instead.
        dri.c/dri.h implements the generic dri extensions call.
        amdgpu.c implements amdgpu specific.

        BUG=b:72972511
        TEST=Chrome booted to UI and passed graphics_Gbm autotest
        CQ-DEPEND=CL:970222

        Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
        Signed-off-by: Satyajit <satyaj...@amd.com>
        ---
        M Makefile
        M amdgpu.c
        A dri.c
        A dri.h
        4 files changed, 423 insertions(+), 326 deletions(-)

        To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromiumos/platform/minigbm
        Gerrit-Branch: master
        Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
        Gerrit-Change-Number: 863723
        Gerrit-PatchSet: 10

        Gurchetan Singh (Gerrit)

        unread,
        Mar 27, 2018, 1:44:29 PM3/27/18
        to Satyajit Sahu, Drew Davenport, Dominik Behr, Stéphane Marchesin, Deepak Sharma, Akshu Agrawal

        I fixed some issues with this patch. Satyajit, can you test on Chrome and Android? Also, we still need to have a proper flush implementation before we can land this. What's the plan to do this? Is to expand the DRI api?

        View Change

        1 comment:

        • File dri.c:

          • Patch Set #10, Line 143:

            	if (!dri->image_extension)
            if (!lookup_extension(dri->core_extension->getExtensions(dri->device), __DRI_IMAGE,
            12, (const __DRIextension **)&dri->image_extension))
            goto free_context;

            if (!dri->flush_extension)
            if (!lookup_extension(dri->core_extension->getExtensions(dri->device), __DRI2_FLUSH,
            4, (const __DRIextension **)&dri->flush_extension))
            goto free_context

            Why do you attempt to lookup the image and flush extensions twice (see line 127 and line 129)??

        To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromiumos/platform/minigbm
        Gerrit-Branch: master
        Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
        Gerrit-Change-Number: 863723
        Gerrit-PatchSet: 10
        Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
        Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
        Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
        Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
        Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
        Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
        Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
        Gerrit-CC: Drew Davenport <ddave...@chromium.org>
        Gerrit-Comment-Date: Tue, 27 Mar 2018 17:44:27 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Gerrit-MessageType: comment

        Satyajit Sahu (Gerrit)

        unread,
        Mar 28, 2018, 4:11:30 AM3/28/18
        to Gurchetan Singh, Drew Davenport, Dominik Behr, Stéphane Marchesin, Deepak Sharma, Akshu Agrawal

        Patch Set 10:

        (1 comment)

        I fixed some issues with this patch. Satyajit, can you test on Chrome and Android? Also, we still need to have a proper flush implementation before we can land this. What's the plan to do this? Is to expand the DRI api?

        I verified Chrome and Android works. But graphics_Gbm autotest is failing because of the num_planes assert dri.c line 185.

        View Change

          To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: chromiumos/platform/minigbm
          Gerrit-Branch: master
          Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
          Gerrit-Change-Number: 863723
          Gerrit-PatchSet: 10
          Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
          Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
          Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
          Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
          Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
          Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
          Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
          Gerrit-CC: Drew Davenport <ddave...@chromium.org>
          Gerrit-Comment-Date: Wed, 28 Mar 2018 08:11:19 +0000

          Satyajit Sahu (Gerrit)

          unread,
          Mar 28, 2018, 4:19:43 AM3/28/18
          to Gurchetan Singh, Drew Davenport, Dominik Behr, Stéphane Marchesin, Deepak Sharma, Akshu Agrawal

          View Change

          1 comment:

            • Patch Set #10, Line 143:

              	if (!dri->image_extension)
              if (!lookup_extension(dri->core_extension->getExtensions(dri->device), __DRI_IMAGE,
              12, (const __DRIextension **)&dri->image_extension))
              goto free_context;

              if (!dri->flush_extension)
              if (!lookup_extension(dri->core_extension->getExtensions(dri->device), __DRI2_FLUSH,
              4, (const __DRIextension **)&dri->flush_extension))
              goto free_context

              Why do you attempt to lookup the image and flush extensions twice (see line 127 and line 129)??

            • lookup_extension for __DRI_IMAGE fails for the first time (line 127) as gallium_driver_extensions does not have __DRI_IMAGE extension. After createNewScreen2 __DRI_IMAGE extension is available as part of the getExtensions.

              The first call for __DRI_IMAGE as of now always fails can be removed.

          To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: chromiumos/platform/minigbm
          Gerrit-Branch: master
          Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
          Gerrit-Change-Number: 863723
          Gerrit-PatchSet: 10
          Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
          Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
          Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
          Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
          Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
          Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
          Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
          Gerrit-CC: Drew Davenport <ddave...@chromium.org>
          Gerrit-Comment-Date: Wed, 28 Mar 2018 08:19:39 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No

          Gurchetan Singh (Gerrit)

          unread,
          Mar 28, 2018, 1:00:12 PM3/28/18
          to Satyajit Sahu, Dominik Behr, Stéphane Marchesin, Akshu Agrawal, Deepak Sharma, Drew Davenport

          Gurchetan Singh uploaded patch set #11 to the change originally created by Satyajit Sahu.

          View Change

          minigbm: using dri extensions

          addrlib dependency removed. dri extensions are called instead.
          dri.c/dri.h implements the generic dri extensions call.
          amdgpu.c implements amdgpu specific.

          BUG=b:72972511
          TEST=Chrome booted to UI and passed graphics_Gbm autotest
          CQ-DEPEND=CL:970222

          Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
          Signed-off-by: Satyajit <satyaj...@amd.com>
          ---
          M Makefile
          M amdgpu.c
          A dri.c
          A dri.h
          4 files changed, 417 insertions(+), 325 deletions(-)

          To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: chromiumos/platform/minigbm
          Gerrit-Branch: master
          Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
          Gerrit-Change-Number: 863723
          Gerrit-PatchSet: 11
          Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
          Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
          Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
          Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
          Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
          Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
          Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
          Gerrit-CC: Drew Davenport <ddave...@chromium.org>
          Gerrit-MessageType: newpatchset

          Gurchetan Singh (Gerrit)

          unread,
          Mar 28, 2018, 1:22:07 PM3/28/18
          to Satyajit Sahu, Dominik Behr, Stéphane Marchesin, Akshu Agrawal, Deepak Sharma, Drew Davenport

          Gurchetan Singh uploaded patch set #12 to the change originally created by Satyajit Sahu.

          View Change

          minigbm: using dri extensions

          addrlib dependency removed. dri extensions are called instead.
          dri.c/dri.h implements the generic dri extensions call.
          amdgpu.c implements amdgpu specific.

          BUG=b:72972511
          TEST=Chrome booted to UI and passed graphics_Gbm autotest
          CQ-DEPEND=CL:970222

          Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
          Signed-off-by: Satyajit <satyaj...@amd.com>
          ---
          M Makefile
          M amdgpu.c
          A dri.c
          A dri.h
          M drv_priv.h
          5 files changed, 418 insertions(+), 326 deletions(-)

          To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: chromiumos/platform/minigbm
          Gerrit-Branch: master
          Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
          Gerrit-Change-Number: 863723
          Gerrit-PatchSet: 12

          Gurchetan Singh (Gerrit)

          unread,
          Mar 28, 2018, 1:27:40 PM3/28/18
          to Satyajit Sahu, Drew Davenport, Dominik Behr, Stéphane Marchesin, Deepak Sharma, Akshu Agrawal

          Patch Set 10:

          Patch Set 10:

          (1 comment)

          I fixed some issues with this patch. Satyajit, can you test on Chrome and Android? Also, we still need to have a proper flush implementation before we can land this. What's the plan to do this? Is to expand the DRI api?

          I verified Chrome and Android works. But graphics_Gbm autotest is failing because of the num_planes assert dri.c line 185.

          Okay, the assert should be fixed. Can you test again? If it still has the issue, feel free to upload the fix ;-)

          The only thing I'm not certain about is the flushing / invalidating mechanism.

          The graphics_Gbm autotest does exercise the flush path. The commit message states graphics_Gbm passed with a prior version of this patchset. Currently, dri_bo_flush should be a no-op, so I'm surprised the test passes. Two questions:

          1) Do you still see garbled output for mmap_test -g with the newest version of the patch?
          2) If not, can you try removing dri_bo_flush, the __DRI_FLUSH extension etc., and see if graphics_Gbm and mmap_test -g still succeed?

          View Change

            To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

            Gerrit-Project: chromiumos/platform/minigbm
            Gerrit-Branch: master
            Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
            Gerrit-Change-Number: 863723
            Gerrit-PatchSet: 12
            Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
            Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
            Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
            Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
            Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
            Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
            Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
            Gerrit-CC: Drew Davenport <ddave...@chromium.org>
            Gerrit-Comment-Date: Wed, 28 Mar 2018 17:27:38 +0000

            Stéphane Marchesin (Gerrit)

            unread,
            Mar 28, 2018, 8:57:23 PM3/28/18
            to Satyajit Sahu, Gurchetan Singh, Drew Davenport, Dominik Behr, Deepak Sharma, Akshu Agrawal

            View Change

            1 comment:

            • File dri.c:

              • Patch Set #12, Line 295: /* TODO: Does this work?? */

                It will do something, but it doesn't do what you need for gbm. For minigbm, ->flush() basically needs to flush the mapping out of the CPU caches so that the memory is visible to the GPU. Dri's ->flush_with_flags() will flush the GPU pipeline so that the CPU gets the latest data. So this is the opposite of what you want.

                Btw I don't see an invalidate callback...

                How are the mappings done on AMD? Are they cached or uncached? Are they tiled and do they need detiling on CPU?

            To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

            Gerrit-Project: chromiumos/platform/minigbm
            Gerrit-Branch: master
            Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
            Gerrit-Change-Number: 863723
            Gerrit-PatchSet: 12
            Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
            Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
            Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
            Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
            Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
            Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
            Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
            Gerrit-CC: Drew Davenport <ddave...@chromium.org>
            Gerrit-Comment-Date: Thu, 29 Mar 2018 00:57:21 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Gerrit-MessageType: comment

            Marek Olšák (Gerrit)

            unread,
            Mar 29, 2018, 10:15:49 PM3/29/18
            to Satyajit Sahu, Gurchetan Singh, Stéphane Marchesin, Drew Davenport, Dominik Behr, Deepak Sharma, Akshu Agrawal

            The CPU access is cached for mappings with the read flag. This has better CPU read performance but worse GPU read/write performance.

            Write-only mappings are uncached and use write combining. This has worse CPU read performance but better GPU read/write performance.

            Images are always tiled. (exceptions are narrow images like Nx1 pixels that are linear) Detiling is never done on the CPU. The driver uses a copy engine on the GPU for detiling (called SDMA). It can do arbitrary subimage copies and fills. SDMA runs in parallel with graphics.

            View Change

              To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

              Gerrit-Project: chromiumos/platform/minigbm
              Gerrit-Branch: master
              Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
              Gerrit-Change-Number: 863723
              Gerrit-PatchSet: 12
              Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
              Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
              Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
              Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
              Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
              Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
              Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
              Gerrit-CC: Drew Davenport <ddave...@chromium.org>
              Gerrit-CC: Marek Olšák <mar...@gmail.com>
              Gerrit-Comment-Date: Fri, 30 Mar 2018 02:15:39 +0000

              Marek Olšák (Gerrit)

              unread,
              Mar 29, 2018, 10:25:43 PM3/29/18
              to Satyajit Sahu, Gurchetan Singh, Stéphane Marchesin, Drew Davenport, Dominik Behr, Deepak Sharma, Akshu Agrawal

              What is the invalidate callback? (this page doesn't seem to have a link to browse the source code)

              View Change

                To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                Gerrit-Project: chromiumos/platform/minigbm
                Gerrit-Branch: master
                Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                Gerrit-Change-Number: 863723
                Gerrit-PatchSet: 12
                Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                Gerrit-CC: Marek Olšák <mar...@gmail.com>
                Gerrit-Comment-Date: Fri, 30 Mar 2018 02:25:41 +0000

                Stéphane Marchesin (Gerrit)

                unread,
                Mar 29, 2018, 10:31:27 PM3/29/18
                to Satyajit Sahu, Gurchetan Singh, Marek Olšák, Drew Davenport, Dominik Behr, Deepak Sharma, Akshu Agrawal

                What is the invalidate callback? (this page doesn't seem to have a
                link to browse the source code)

                Here is how things work:

                • minigbm will try to keep mappings persistent for performance reasons. This means that the driver will not see the map/unmap() callbacks after the first mapping, but instead will get invalidate() and flush() callbacks
                • the fact that the mappings are cached for your case means that we need something in the invalidate and flush callbacks, to ensure coherency. Obviously if you have a coherent CPU/GPU architecture, invalidate() and flush() are noops, but it doesn't seem like that's the case here.
                • the invalidate callback invalidates the CPU cache's view of a surface, and obtains latest GPU data
                • the flush callback flushes the current CPU cache's view of a surface, so that the GPU can see it

                View Change

                  To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                  Gerrit-Project: chromiumos/platform/minigbm
                  Gerrit-Branch: master
                  Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                  Gerrit-Change-Number: 863723
                  Gerrit-PatchSet: 12
                  Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                  Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                  Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                  Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                  Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                  Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                  Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                  Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                  Gerrit-CC: Marek Olšák <mar...@gmail.com>
                  Gerrit-Comment-Date: Fri, 30 Mar 2018 02:31:25 +0000

                  Gurchetan Singh (Gerrit)

                  unread,
                  Mar 29, 2018, 11:18:12 PM3/29/18
                  to Satyajit Sahu, Stéphane Marchesin, Marek Olšák, Drew Davenport, Dominik Behr, Deepak Sharma, Akshu Agrawal

                  Patch Set 12:

                  What is the invalidate callback? (this page doesn't seem to have a link to browse the source code)

                  The invalidate callback is drv_bo_invalidate, and only called when the driver implements. You can browse the repo here:

                  https://chromium.googlesource.com/chromiumos/platform/minigbm/+/master/drv.c

                  or

                  git clone https://chromium.googlesource.com/chromiumos/platform/minigbm

                  View Change

                    To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                    Gerrit-Project: chromiumos/platform/minigbm
                    Gerrit-Branch: master
                    Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                    Gerrit-Change-Number: 863723
                    Gerrit-PatchSet: 12
                    Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                    Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                    Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                    Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                    Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                    Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                    Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                    Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                    Gerrit-CC: Marek Olšák <mar...@gmail.com>
                    Gerrit-Comment-Date: Fri, 30 Mar 2018 03:18:10 +0000

                    Marek Olšák (Gerrit)

                    unread,
                    Apr 2, 2018, 1:50:14 PM4/2/18
                    to Satyajit Sahu, Gurchetan Singh, Stéphane Marchesin, Drew Davenport, Dominik Behr, Deepak Sharma, Akshu Agrawal

                    Patch Set 12:

                    What is the invalidate callback? (this page doesn't seem to have a
                    link to browse the source code)

                    Here is how things work:

                    • minigbm will try to keep mappings persistent for performance reasons. This means that the driver will not see the map/unmap() callbacks after the first mapping, but instead will get invalidate() and flush() callbacks
                    • the fact that the mappings are cached for your case means that we need something in the invalidate and flush callbacks, to ensure coherency. Obviously if you have a coherent CPU/GPU architecture, invalidate() and flush() are noops, but it doesn't seem like that's the case here.
                    • the invalidate callback invalidates the CPU cache's view of a surface, and obtains latest GPU data
                    • the flush callback flushes the current CPU cache's view of a surface, so that the GPU can see it

                    Because of delta color compression (DCC) on GCN 1.2 and later, persistent image mappings are unsupported. In order to support invalidate & flush, we have to keep a linear copy of the image in memory. Invalidate would be a blit from tiled+compressed to linear, while flush would be a blit from linear to tiled+compressed.

                    My concern is that invalidate & flush give the misleading impression that they are only cheap cache flushes and not potentially expensive blits.

                    The good news is that the driver doesn't need (almost?) any changes. minigbm can allocate the linear images manually and do the blits for flush & invalidate also manually.

                    View Change

                      To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                      Gerrit-Project: chromiumos/platform/minigbm
                      Gerrit-Branch: master
                      Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                      Gerrit-Change-Number: 863723
                      Gerrit-PatchSet: 12
                      Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                      Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                      Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                      Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                      Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                      Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                      Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                      Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                      Gerrit-CC: Marek Olšák <mar...@gmail.com>
                      Gerrit-Comment-Date: Mon, 02 Apr 2018 17:50:12 +0000

                      Gurchetan Singh (Gerrit)

                      unread,
                      Apr 2, 2018, 5:26:27 PM4/2/18
                      to Satyajit Sahu, Dominik Behr, Stéphane Marchesin, Akshu Agrawal, Deepak Sharma, Marek Olšák, Drew Davenport

                      Gurchetan Singh uploaded patch set #13 to the change originally created by Satyajit Sahu.

                      View Change

                      minigbm: using dri extensions

                      addrlib dependency removed. dri extensions are called instead.
                      dri.c/dri.h implements the generic dri extensions call.
                      amdgpu.c implements amdgpu specific.

                      BUG=b:72972511
                      TEST=Chrome booted to UI and passed graphics_Gbm autotest
                      CQ-DEPEND=CL:970222

                      Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                      Signed-off-by: Satyajit <satyaj...@amd.com>
                      ---
                      M Makefile
                      M amdgpu.c
                      A dri.c
                      A dri.h
                      M drv_priv.h
                      5 files changed, 390 insertions(+), 329 deletions(-)

                      To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                      Gerrit-Project: chromiumos/platform/minigbm
                      Gerrit-Branch: master
                      Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                      Gerrit-Change-Number: 863723
                      Gerrit-PatchSet: 13
                      Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                      Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                      Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                      Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                      Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                      Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                      Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                      Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                      Gerrit-CC: Marek Olšák <mar...@gmail.com>
                      Gerrit-MessageType: newpatchset

                      Gurchetan Singh (Gerrit)

                      unread,
                      Apr 2, 2018, 5:29:08 PM4/2/18
                      to Satyajit Sahu, Stéphane Marchesin, Marek Olšák, Drew Davenport, Dominik Behr, Deepak Sharma, Akshu Agrawal

                      Patch Set 12:

                      Patch Set 12:

                      What is the invalidate callback? (this page doesn't seem to have a
                      link to browse the source code)

                      Here is how things work:

                      • minigbm will try to keep mappings persistent for performance reasons. This means that the driver will not see the map/unmap() callbacks after the first mapping, but instead will get invalidate() and flush() callbacks
                      • the fact that the mappings are cached for your case means that we need something in the invalidate and flush callbacks, to ensure coherency. Obviously if you have a coherent CPU/GPU architecture, invalidate() and flush() are noops, but it doesn't seem like that's the case here.
                      • the invalidate callback invalidates the CPU cache's view of a surface, and obtains latest GPU data
                      • the flush callback flushes the current CPU cache's view of a surface, so that the GPU can see it

                      Because of delta color compression (DCC) on GCN 1.2 and later, persistent image mappings are unsupported. In order to support invalidate & flush, we have to keep a linear copy of the image in memory. Invalidate would be a blit from tiled+compressed to linear, while flush would be a blit from linear to tiled+compressed.

                      My concern is that invalidate & flush give the misleading impression that they are only cheap cache flushes and not potentially expensive blits.

                      The good news is that the driver doesn't need (almost?) any changes. minigbm can allocate the linear images manually and do the blits for flush & invalidate also manually.

                      We decided to modify minigbm (crrev.com/c/990892) to not always keep persistent mappings, since blits can be expensive. Shirish, can you test both patches (kahlee devices are in limited supply here)?

                      View Change

                        To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                        Gerrit-Project: chromiumos/platform/minigbm
                        Gerrit-Branch: master
                        Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                        Gerrit-Change-Number: 863723
                        Gerrit-PatchSet: 13
                        Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                        Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                        Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                        Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                        Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                        Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                        Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                        Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                        Gerrit-CC: Marek Olšák <mar...@gmail.com>
                        Gerrit-Comment-Date: Mon, 02 Apr 2018 21:29:05 +0000

                        Stéphane Marchesin (Gerrit)

                        unread,
                        Apr 2, 2018, 10:00:18 PM4/2/18
                        to Satyajit Sahu, Gurchetan Singh, Marek Olšák, Drew Davenport, Dominik Behr, Deepak Sharma, Akshu Agrawal

                        Patch Set 12:
                        > > Patch Set 12:
                        >
                        > > What is the invalidate callback? (this page doesn't seem to
                        have a
                        > > link to browse the source code)
                        >
                        > Here is how things work:

                        > - minigbm will try to keep mappings persistent for performance


                        reasons. This means that the driver will not see the map/unmap()
                        callbacks after the first mapping, but instead will get
                        invalidate() and flush() callbacks

                        > - the fact that the mappings are cached for your case means


                        that we need something in the invalidate and flush callbacks, to
                        ensure coherency. Obviously if you have a coherent CPU/GPU
                        architecture, invalidate() and flush() are noops, but it doesn't
                        seem like that's the case here.

                        > - the invalidate callback invalidates the CPU cache's view of a


                        surface, and obtains latest GPU data

                        > - the flush callback flushes the current CPU cache's view of a


                        surface, so that the GPU can see it
                        > Because of delta color compression (DCC) on GCN 1.2 and later,
                        persistent image mappings are unsupported. In order to support
                        invalidate & flush, we have to keep a linear copy of the image in
                        memory. Invalidate would be a blit from tiled+compressed to linear,
                        while flush would be a blit from linear to tiled+compressed.
                        > My concern is that invalidate & flush give the misleading
                        impression that they are only cheap cache flushes and not
                        potentially expensive blits.
                        > The good news is that the driver doesn't need (almost?) any
                        changes. minigbm can allocate the linear images manually and do the
                        blits for flush & invalidate also manually.

                        We decided to modify minigbm (crrev.com/c/990892) to not always
                        keep persistent mappings, since blits can be expensive. Shirish,
                        can you test both patches (kahlee devices are in limited supply
                        here)?

                        Note that if we find ways to implement flush/invalidate later, we can always add them back.

                        View Change

                          To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                          Gerrit-Project: chromiumos/platform/minigbm
                          Gerrit-Branch: master
                          Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                          Gerrit-Change-Number: 863723
                          Gerrit-PatchSet: 13
                          Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                          Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                          Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                          Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                          Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                          Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                          Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                          Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                          Gerrit-CC: Marek Olšák <mar...@gmail.com>
                          Gerrit-Comment-Date: Tue, 03 Apr 2018 02:00:15 +0000

                          Satyajit Sahu (Gerrit)

                          unread,
                          Apr 3, 2018, 4:13:52 AM4/3/18
                          to Dominik Behr, Stéphane Marchesin, Akshu Agrawal, Deepak Sharma, Gurchetan Singh, Marek Olšák, Drew Davenport

                          Satyajit Sahu uploaded patch set #14 to this change.

                          View Change

                          minigbm: using dri extensions

                          addrlib dependency removed. dri extensions are called instead.
                          dri.c/dri.h implements the generic dri extensions call.
                          amdgpu.c implements amdgpu specific.

                          BUG=b:72972511
                          TEST=Chrome booted to UI and passed graphics_Gbm autotest
                          CQ-DEPEND=CL:970222

                          Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                          Signed-off-by: Satyajit <satyaj...@amd.com>
                          ---
                          M Makefile
                          M amdgpu.c
                          A dri.c
                          A dri.h
                          M drv_priv.h
                          5 files changed, 414 insertions(+), 350 deletions(-)

                          To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                          Gerrit-Project: chromiumos/platform/minigbm
                          Gerrit-Branch: master
                          Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                          Gerrit-Change-Number: 863723
                          Gerrit-PatchSet: 14
                          Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                          Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                          Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                          Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                          Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                          Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                          Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                          Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                          Gerrit-CC: Marek Olšák <mar...@gmail.com>
                          Gerrit-MessageType: newpatchset

                          Satyajit Sahu (Gerrit)

                          unread,
                          Apr 3, 2018, 4:16:09 AM4/3/18
                          to Stéphane Marchesin, Gurchetan Singh, Marek Olšák, Drew Davenport, Dominik Behr, Deepak Sharma, Akshu Agrawal

                          Fixed some minor issues. Verified graphics_Gbm autotest, mmap_test -g and Android playstore.

                          View Change

                            To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                            Gerrit-Project: chromiumos/platform/minigbm
                            Gerrit-Branch: master
                            Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                            Gerrit-Change-Number: 863723
                            Gerrit-PatchSet: 14
                            Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                            Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                            Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                            Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                            Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                            Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                            Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                            Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                            Gerrit-CC: Marek Olšák <mar...@gmail.com>
                            Gerrit-Comment-Date: Tue, 03 Apr 2018 08:16:05 +0000

                            Satyajit Sahu (Gerrit)

                            unread,
                            Apr 3, 2018, 4:26:37 AM4/3/18
                            to Stéphane Marchesin, Gurchetan Singh, Marek Olšák, Drew Davenport, Dominik Behr, Deepak Sharma, Akshu Agrawal

                            libdrm change https://cgit.freedesktop.org/mesa/drm/commit/?id=b81d44d587d1706d5c7568e539340632a748782b is a dependency for this patch.

                            View Change

                              To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                              Gerrit-Project: chromiumos/platform/minigbm
                              Gerrit-Branch: master
                              Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                              Gerrit-Change-Number: 863723
                              Gerrit-PatchSet: 14
                              Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                              Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                              Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                              Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                              Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                              Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                              Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                              Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                              Gerrit-CC: Marek Olšák <mar...@gmail.com>
                              Gerrit-Comment-Date: Tue, 03 Apr 2018 08:26:33 +0000

                              Gurchetan Singh (Gerrit)

                              unread,
                              Apr 3, 2018, 12:18:32 PM4/3/18
                              to Satyajit Sahu, Dominik Behr, Stéphane Marchesin, Akshu Agrawal, Deepak Sharma, Marek Olšák, Drew Davenport

                              Gurchetan Singh uploaded patch set #15 to the change originally created by Satyajit Sahu.

                              View Change

                              minigbm: using dri extensions

                              addrlib dependency removed. dri extensions are called instead.
                              dri.c/dri.h implements the generic dri extensions call.
                              amdgpu.c implements amdgpu specific.

                              BUG=b:72972511
                              TEST=Chrome booted to UI and passed graphics_Gbm autotest
                              CQ-DEPEND=CL:970222

                              Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                              Signed-off-by: Satyajit <satyaj...@amd.com>
                              ---
                              M Makefile
                              M amdgpu.c
                              A dri.c
                              A dri.h
                              M drv_priv.h
                              5 files changed, 394 insertions(+), 330 deletions(-)

                              To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                              Gerrit-Project: chromiumos/platform/minigbm
                              Gerrit-Branch: master
                              Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                              Gerrit-Change-Number: 863723
                              Gerrit-PatchSet: 15
                              Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                              Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                              Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                              Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                              Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                              Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                              Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                              Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                              Gerrit-CC: Marek Olšák <mar...@gmail.com>
                              Gerrit-MessageType: newpatchset

                              Gurchetan Singh (Gerrit)

                              unread,
                              Apr 3, 2018, 12:19:43 PM4/3/18
                              to Satyajit Sahu, Stéphane Marchesin, Marek Olšák, Drew Davenport, Dominik Behr, Deepak Sharma, Akshu Agrawal

                              Patch Set 14:

                              Fixed some minor issues. Verified graphics_Gbm autotest, mmap_test -g and Android playstore.

                              Good catch! I believe the original intention was subclass to the dri driver when needed, which the newest patch does.

                              View Change

                                To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                Gerrit-Project: chromiumos/platform/minigbm
                                Gerrit-Branch: master
                                Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                Gerrit-Change-Number: 863723
                                Gerrit-PatchSet: 14
                                Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                Gerrit-Comment-Date: Tue, 03 Apr 2018 16:19:38 +0000

                                Gurchetan Singh (Gerrit)

                                unread,
                                Apr 3, 2018, 12:19:54 PM4/3/18
                                to Satyajit Sahu, Stéphane Marchesin, Marek Olšák, Drew Davenport, Dominik Behr, Deepak Sharma, Akshu Agrawal

                                Patch Set 14:

                                Can you backport this patch to ~/trunk/src/third_party/libdrm/?

                                View Change

                                  To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                  Gerrit-Project: chromiumos/platform/minigbm
                                  Gerrit-Branch: master
                                  Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                  Gerrit-Change-Number: 863723
                                  Gerrit-PatchSet: 15
                                  Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                  Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                  Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                  Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                  Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                  Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                  Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                  Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                  Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                  Gerrit-Comment-Date: Tue, 03 Apr 2018 16:19:52 +0000

                                  Satyajit Sahu (Gerrit)

                                  unread,
                                  Apr 4, 2018, 2:42:30 AM4/4/18
                                  to Dominik Behr, Stéphane Marchesin, Akshu Agrawal, Deepak Sharma, Gurchetan Singh, Marek Olšák, Drew Davenport

                                  Satyajit Sahu uploaded patch set #16 to this change.

                                  View Change

                                  minigbm: using dri extensions

                                  addrlib dependency removed. dri extensions are called instead.
                                  dri.c/dri.h implements the generic dri extensions call.
                                  amdgpu.c implements amdgpu specific.

                                  BUG=b:72972511
                                  TEST=Chrome booted to UI and passed graphics_Gbm autotest
                                  CQ-DEPEND=CL:970222

                                  Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                  Signed-off-by: Satyajit <satyaj...@amd.com>
                                  ---
                                  M Makefile
                                  M amdgpu.c
                                  A dri.c
                                  A dri.h
                                  M drv_priv.h
                                  5 files changed, 398 insertions(+), 333 deletions(-)

                                  To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                  Gerrit-Project: chromiumos/platform/minigbm
                                  Gerrit-Branch: master
                                  Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                  Gerrit-Change-Number: 863723
                                  Gerrit-PatchSet: 16
                                  Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                  Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                  Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                  Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                  Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                  Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                  Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                  Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                  Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                  Gerrit-MessageType: newpatchset

                                  Satyajit Sahu (Gerrit)

                                  unread,
                                  Apr 4, 2018, 2:54:14 AM4/4/18
                                  to Gurchetan Singh, Stéphane Marchesin, Marek Olšák, Drew Davenport, Dominik Behr, Deepak Sharma, Akshu Agrawal

                                  Patch Set 14:

                                  Patch Set 14:

                                  Fixed some minor issues. Verified graphics_Gbm autotest, mmap_test -g and Android playstore.

                                  Good catch! I believe the original intention was subclass to the dri driver when needed, which the newest patch does.

                                  The patch worked after a small modification.

                                  View Change

                                    To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                    Gerrit-Project: chromiumos/platform/minigbm
                                    Gerrit-Branch: master
                                    Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                    Gerrit-Change-Number: 863723
                                    Gerrit-PatchSet: 16
                                    Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                    Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                    Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                    Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                    Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                    Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                    Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                    Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                    Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                    Gerrit-Comment-Date: Wed, 04 Apr 2018 06:54:11 +0000

                                    Satyajit Sahu (Gerrit)

                                    unread,
                                    Apr 4, 2018, 2:56:05 AM4/4/18
                                    to Gurchetan Singh, Stéphane Marchesin, Marek Olšák, Drew Davenport, Dominik Behr, Deepak Sharma, Akshu Agrawal

                                    Patch Set 15:

                                    Patch Set 14:

                                    libdrm change https://cgit.freedesktop.org/mesa/drm/commit/?id=b81d44d587d1706d5c7568e539340632a748782b is a dependency for this patch.

                                    Can you backport this patch to ~/trunk/src/third_party/libdrm/?

                                    Done. crrev.com/c/994934

                                    View Change

                                      To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                      Gerrit-Project: chromiumos/platform/minigbm
                                      Gerrit-Branch: master
                                      Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                      Gerrit-Change-Number: 863723
                                      Gerrit-PatchSet: 16
                                      Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                      Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                      Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                      Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                      Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                      Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                      Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                      Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                      Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                      Gerrit-Comment-Date: Wed, 04 Apr 2018 06:56:01 +0000

                                      Gurchetan Singh (Gerrit)

                                      unread,
                                      Apr 4, 2018, 12:14:00 PM4/4/18
                                      to Satyajit Sahu, Stéphane Marchesin, Marek Olšák, Drew Davenport, Dominik Behr, Deepak Sharma, Akshu Agrawal

                                      lgtm, though I'll let someone else +2 since I made modifications to this patchset aswell

                                      Patch set 16:Code-Review +1

                                      View Change

                                        To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                        Gerrit-Project: chromiumos/platform/minigbm
                                        Gerrit-Branch: master
                                        Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                        Gerrit-Change-Number: 863723
                                        Gerrit-PatchSet: 16
                                        Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                        Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                        Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                        Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                        Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                        Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                        Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                        Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                        Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                        Gerrit-Comment-Date: Wed, 04 Apr 2018 16:13:53 +0000
                                        Gerrit-HasComments: No
                                        Gerrit-Has-Labels: Yes
                                        Gerrit-MessageType: comment

                                        Satyajit Sahu (Gerrit)

                                        unread,
                                        Apr 6, 2018, 7:01:12 AM4/6/18
                                        to Dominik Behr, Stéphane Marchesin, Akshu Agrawal, Deepak Sharma, Gurchetan Singh, Marek Olšák, Drew Davenport

                                        Satyajit Sahu uploaded patch set #17 to this change.

                                        View Change

                                        minigbm: using dri extensions

                                        addrlib dependency removed. dri extensions are called instead.
                                        dri.c/dri.h implements the generic dri extensions call.
                                        amdgpu.c implements amdgpu specific.

                                        BUG=b:72972511
                                        TEST=Chrome booted to UI and passed graphics_Gbm autotest
                                        CQ-DEPEND=CL:970222 CL:955552


                                        Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                        Signed-off-by: Satyajit <satyaj...@amd.com>
                                        ---
                                        M Makefile
                                        M amdgpu.c
                                        A dri.c
                                        A dri.h
                                        M drv_priv.h
                                        5 files changed, 398 insertions(+), 333 deletions(-)

                                        To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                        Gerrit-Project: chromiumos/platform/minigbm
                                        Gerrit-Branch: master
                                        Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                        Gerrit-Change-Number: 863723
                                        Gerrit-PatchSet: 17
                                        Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                        Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                        Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                        Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                        Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                        Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                        Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                        Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                        Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                        Gerrit-MessageType: newpatchset

                                        Satyajit Sahu (Gerrit)

                                        unread,
                                        Apr 6, 2018, 7:02:36 AM4/6/18
                                        to Dominik Behr, Stéphane Marchesin, Akshu Agrawal, Deepak Sharma, Gurchetan Singh, Marek Olšák, Drew Davenport

                                        Satyajit Sahu uploaded patch set #18 to this change.

                                        View Change

                                        minigbm: using dri extensions

                                        addrlib dependency removed. dri extensions are called instead.
                                        dri.c/dri.h implements the generic dri extensions call.
                                        amdgpu.c implements amdgpu specific.

                                        BUG=b:72972511
                                        TEST=Chrome booted to UI and passed graphics_Gbm autotest
                                        CQ-DEPEND=CL:955552


                                        Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                        Signed-off-by: Satyajit <satyaj...@amd.com>
                                        ---
                                        M Makefile
                                        M amdgpu.c
                                        A dri.c
                                        A dri.h
                                        M drv_priv.h
                                        5 files changed, 398 insertions(+), 333 deletions(-)

                                        To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                        Gerrit-Project: chromiumos/platform/minigbm
                                        Gerrit-Branch: master
                                        Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                        Gerrit-Change-Number: 863723
                                        Gerrit-PatchSet: 18

                                        Drew Davenport (Gerrit)

                                        unread,
                                        Apr 9, 2018, 12:08:20 PM4/9/18
                                        to Satyajit Sahu, Gurchetan Singh, Stéphane Marchesin, Marek Olšák, Dominik Behr, Deepak Sharma, Akshu Agrawal

                                        Who would be a good person to review and +2 this? Dominik or Stephane?

                                        View Change

                                          To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                          Gerrit-Project: chromiumos/platform/minigbm
                                          Gerrit-Branch: master
                                          Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                          Gerrit-Change-Number: 863723
                                          Gerrit-PatchSet: 18
                                          Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                          Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                          Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                          Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                          Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                          Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                          Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                          Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                          Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                          Gerrit-Comment-Date: Mon, 09 Apr 2018 16:08:18 +0000

                                          Drew Davenport (Gerrit)

                                          unread,
                                          Apr 9, 2018, 5:51:57 PM4/9/18
                                          to Satyajit Sahu, Gurchetan Singh, Stéphane Marchesin, Marek Olšák, Dominik Behr, Deepak Sharma, Akshu Agrawal

                                          With this patch, there may be an issue with mapping a second time.

                                          When testing https://chromium-review.googlesource.com/c/chromiumos/platform/drm-tests/+/987531, I cherry-picked this CL to fix the garbled image on the display, but found that the loop to draw the transparent stripes was having no effect.

                                          For a simpler repro case, call draw_to_plane(...., DRAW_ELLIPSE) on the primary plane right after DRAW_STRIPE in test_underlay(). An ellipse should be drawn to completely overwrite the stripes, but the stripes are still there unaffected.

                                          View Change

                                            To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                            Gerrit-Project: chromiumos/platform/minigbm
                                            Gerrit-Branch: master
                                            Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                            Gerrit-Change-Number: 863723
                                            Gerrit-PatchSet: 18
                                            Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                            Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                            Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                            Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                            Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                            Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                            Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                            Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                            Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                            Gerrit-Comment-Date: Mon, 09 Apr 2018 21:51:49 +0000

                                            Gurchetan Singh (Gerrit)

                                            unread,
                                            Apr 9, 2018, 5:57:06 PM4/9/18
                                            to Satyajit Sahu, Stéphane Marchesin, Marek Olšák, Drew Davenport, Dominik Behr, Deepak Sharma, Akshu Agrawal

                                            Patch Set 18:

                                            With this patch, there may be an issue with mapping a second time.

                                            When testing https://chromium-review.googlesource.com/c/chromiumos/platform/drm-tests/+/987531, I cherry-picked this CL to fix the garbled image on the display, but found that the loop to draw the transparent stripes was having no effect.

                                            For a simpler repro case, call draw_to_plane(...., DRAW_ELLIPSE) on the primary plane right after DRAW_STRIPE in test_underlay(). An ellipse should be drawn to completely overwrite the stripes, but the stripes are still there unaffected.

                                            Did you have crrev.com/c/990892 also applied?

                                            View Change

                                              To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                              Gerrit-Project: chromiumos/platform/minigbm
                                              Gerrit-Branch: master
                                              Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                              Gerrit-Change-Number: 863723
                                              Gerrit-PatchSet: 18
                                              Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                              Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                              Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                              Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                              Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                              Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                              Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                              Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                              Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                              Gerrit-Comment-Date: Mon, 09 Apr 2018 21:57:04 +0000

                                              Drew Davenport (Gerrit)

                                              unread,
                                              Apr 9, 2018, 6:01:41 PM4/9/18
                                              to Satyajit Sahu, Gurchetan Singh, Stéphane Marchesin, Marek Olšák, Dominik Behr, Deepak Sharma, Akshu Agrawal

                                              Patch Set 18:

                                              Patch Set 18:

                                              With this patch, there may be an issue with mapping a second time.

                                              When testing https://chromium-review.googlesource.com/c/chromiumos/platform/drm-tests/+/987531, I cherry-picked this CL to fix the garbled image on the display, but found that the loop to draw the transparent stripes was having no effect.

                                              For a simpler repro case, call draw_to_plane(...., DRAW_ELLIPSE) on the primary plane right after DRAW_STRIPE in test_underlay(). An ellipse should be drawn to completely overwrite the stripes, but the stripes are still there unaffected.

                                              Did you have crrev.com/c/990892 also applied?

                                              Yes, I had synced up to ToT earlier today, which had that CL.

                                              View Change

                                                To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                Gerrit-Project: chromiumos/platform/minigbm
                                                Gerrit-Branch: master
                                                Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                Gerrit-Change-Number: 863723
                                                Gerrit-PatchSet: 18
                                                Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                                Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                                Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                                Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                                Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                                Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                                Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                                Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                                Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                                Gerrit-Comment-Date: Mon, 09 Apr 2018 22:01:38 +0000

                                                Gurchetan Singh (Gerrit)

                                                unread,
                                                Apr 9, 2018, 6:08:34 PM4/9/18
                                                to Satyajit Sahu, Stéphane Marchesin, Marek Olšák, Drew Davenport, Dominik Behr, Deepak Sharma, Akshu Agrawal

                                                Patch Set 18:

                                                Patch Set 18:

                                                Patch Set 18:

                                                With this patch, there may be an issue with mapping a second time.

                                                When testing https://chromium-review.googlesource.com/c/chromiumos/platform/drm-tests/+/987531, I cherry-picked this CL to fix the garbled image on the display, but found that the loop to draw the transparent stripes was having no effect.

                                                For a simpler repro case, call draw_to_plane(...., DRAW_ELLIPSE) on the primary plane right after DRAW_STRIPE in test_underlay(). An ellipse should be drawn to completely overwrite the stripes, but the stripes are still there unaffected.

                                                Did you have crrev.com/c/990892 also applied?

                                                Yes, I had synced up to ToT earlier today, which had that CL.

                                                Does graphics_Gbm pass for you with this patch applied? test_gem_map_format does try to verify writes are successful:

                                                https://chromium.googlesource.com/chromiumos/third_party/autotest/+/master/client/site_tests/graphics_Gbm/src/gbmtest.c

                                                View Change

                                                  To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                  Gerrit-Project: chromiumos/platform/minigbm
                                                  Gerrit-Branch: master
                                                  Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                  Gerrit-Change-Number: 863723
                                                  Gerrit-PatchSet: 18
                                                  Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                                  Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                                  Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                                  Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                                  Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                                  Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                                  Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                                  Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                                  Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                                  Gerrit-Comment-Date: Mon, 09 Apr 2018 22:08:32 +0000

                                                  Drew Davenport (Gerrit)

                                                  unread,
                                                  Apr 9, 2018, 6:20:52 PM4/9/18
                                                  to Satyajit Sahu, Gurchetan Singh, Stéphane Marchesin, Marek Olšák, Dominik Behr, Deepak Sharma, Akshu Agrawal

                                                  Patch Set 18:

                                                  Patch Set 18:

                                                  Patch Set 18:

                                                  Patch Set 18:

                                                  With this patch, there may be an issue with mapping a second time.

                                                  When testing https://chromium-review.googlesource.com/c/chromiumos/platform/drm-tests/+/987531, I cherry-picked this CL to fix the garbled image on the display, but found that the loop to draw the transparent stripes was having no effect.

                                                  For a simpler repro case, call draw_to_plane(...., DRAW_ELLIPSE) on the primary plane right after DRAW_STRIPE in test_underlay(). An ellipse should be drawn to completely overwrite the stripes, but the stripes are still there unaffected.

                                                  Did you have crrev.com/c/990892 also applied?

                                                  Yes, I had synced up to ToT earlier today, which had that CL.

                                                  Does graphics_Gbm pass for you with this patch applied? test_gem_map_format does try to verify writes are successful:

                                                  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/master/client/site_tests/graphics_Gbm/src/gbmtest.c

                                                  That test succeeded for me with this patch applied.

                                                  View Change

                                                    To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                    Gerrit-Project: chromiumos/platform/minigbm
                                                    Gerrit-Branch: master
                                                    Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                    Gerrit-Change-Number: 863723
                                                    Gerrit-PatchSet: 18
                                                    Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                                    Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                                    Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                                    Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                                    Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                                    Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                                    Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                                    Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                                    Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                                    Gerrit-Comment-Date: Mon, 09 Apr 2018 22:20:50 +0000

                                                    Satyajit Sahu (Gerrit)

                                                    unread,
                                                    Apr 10, 2018, 5:45:58 AM4/10/18
                                                    to Gurchetan Singh, Stéphane Marchesin, Marek Olšák, Drew Davenport, Dominik Behr, Deepak Sharma, Akshu Agrawal

                                                    Patch Set 18:

                                                    Patch Set 18:

                                                    Patch Set 18:

                                                    Patch Set 18:

                                                    Patch Set 18:

                                                    With this patch, there may be an issue with mapping a second time.

                                                    When testing https://chromium-review.googlesource.com/c/chromiumos/platform/drm-tests/+/987531, I cherry-picked this CL to fix the garbled image on the display, but found that the loop to draw the transparent stripes was having no effect.

                                                    For a simpler repro case, call draw_to_plane(...., DRAW_ELLIPSE) on the primary plane right after DRAW_STRIPE in test_underlay(). An ellipse should be drawn to completely overwrite the stripes, but the stripes are still there unaffected.

                                                    Did you have crrev.com/c/990892 also applied?

                                                    Yes, I had synced up to ToT earlier today, which had that CL.

                                                    Does graphics_Gbm pass for you with this patch applied? test_gem_map_format does try to verify writes are successful:

                                                    https://chromium.googlesource.com/chromiumos/third_party/autotest/+/master/client/site_tests/graphics_Gbm/src/gbmtest.c

                                                    That test succeeded for me with this patch applied.

                                                    There are two issues.
                                                    It looks like the dri context needs to be flushed after unmap.
                                                    And map returns a bigger stride. Which causes some corruption.
                                                    With below patch test_underlay is working fine.

                                                    diff --git a/dri.c b/dri.c
                                                    index 776658d..06fa2e7 100644
                                                    --- a/dri.c
                                                    +++ b/dri.c
                                                    @@ -261,6 +261,7 @@ void *dri_bo_map(struct bo *bo, struct vma *vma, size_t plane, uint32_t map_flag
                                                    /* GBM flags and DRI flags are the same. */
                                                    vma->addr = dri->image_extension->mapImage(dri->context, bo->priv, 0, 0, bo->width,
                                                    bo->height, map_flags, &stride, &vma->priv);
                                                    + bo->strides[plane] = stride;
                                                    if (!vma->addr)
                                                    return MAP_FAILED;

                                                    @@ -270,9 +271,13 @@ void *dri_bo_map(struct bo *bo, struct vma *vma, size_t plane, uint32_t map_flag
                                                    int dri_bo_unmap(struct bo *bo, struct vma *vma)
                                                    {
                                                    struct dri_driver *dri = bo->drv->priv;
                                                    + const __DRI2flushExtension *flush_extension;

                                                    assert(vma->priv);
                                                    dri->image_extension->unmapImage(dri->context, bo->priv, vma->priv);
                                                    + if (lookup_extension(dri->core_extension->getExtensions(dri->device), __DRI2_FLUSH, 4,
                                                    + (const __DRIextension **)&flush_extension))
                                                    + flush_extension->flush_with_flags(dri->context, NULL, __DRI2_FLUSH_CONTEXT, 0);
                                                    return 0;
                                                    }

                                                    View Change

                                                      To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                      Gerrit-Project: chromiumos/platform/minigbm
                                                      Gerrit-Branch: master
                                                      Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                      Gerrit-Change-Number: 863723
                                                      Gerrit-PatchSet: 18
                                                      Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                                      Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                                      Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                                      Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                                      Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                                      Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                                      Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                                      Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                                      Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                                      Gerrit-Comment-Date: Tue, 10 Apr 2018 09:45:48 +0000

                                                      Kristian H. Kristensen (Gerrit)

                                                      unread,
                                                      Apr 10, 2018, 7:20:23 PM4/10/18
                                                      to Satyajit Sahu, Gurchetan Singh, Stéphane Marchesin, Marek Olšák, Drew Davenport, Dominik Behr, Deepak Sharma, Akshu Agrawal

                                                      View Change

                                                      1 comment:

                                                      • File dri.c:

                                                        • Patch Set #18, Line 262: mapImage

                                                          I'm not sure about this... we have to allocate a DRI context for this (more or less a full GL context) and the map/unmap operations now involve running the dma/blit engine or the GPU to copy in and out of staging buffers. Is it possible to mix the DRI allocation path with the DRM_IOCTL_AMDGPU_GEM_MMAP ioctl for mmap that we used before?

                                                      To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                      Gerrit-Project: chromiumos/platform/minigbm
                                                      Gerrit-Branch: master
                                                      Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                      Gerrit-Change-Number: 863723
                                                      Gerrit-PatchSet: 18
                                                      Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                                      Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                                      Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                                      Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                                      Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                                      Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                                      Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                                      Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                                      Gerrit-CC: Kristian H. Kristensen <hoeg...@chromium.org>
                                                      Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                                      Gerrit-Comment-Date: Tue, 10 Apr 2018 23:20:18 +0000
                                                      Gerrit-HasComments: Yes
                                                      Gerrit-Has-Labels: No
                                                      Gerrit-MessageType: comment

                                                      Satyajit Sahu (Gerrit)

                                                      unread,
                                                      Apr 11, 2018, 2:46:38 AM4/11/18
                                                      to Kristian H. Kristensen, Gurchetan Singh, Stéphane Marchesin, Marek Olšák, Drew Davenport, Dominik Behr, Deepak Sharma, Akshu Agrawal

                                                      Patch Set 18:

                                                      (1 comment)

                                                      View Change

                                                      1 comment:

                                                        • I'm not sure about this... […]

                                                          I dont think that is possible as DRM_IOCTL_GEM_MMAP will return the tiled data.
                                                          Flushing the dri context after unmap solves the repeated map/unmap issue.

                                                      To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                      Gerrit-Project: chromiumos/platform/minigbm
                                                      Gerrit-Branch: master
                                                      Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                      Gerrit-Change-Number: 863723
                                                      Gerrit-PatchSet: 18
                                                      Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                                      Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                                      Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                                      Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                                      Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                                      Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                                      Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                                      Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                                      Gerrit-CC: Kristian H. Kristensen <hoeg...@chromium.org>
                                                      Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                                      Gerrit-Comment-Date: Wed, 11 Apr 2018 06:46:33 +0000
                                                      Gerrit-HasComments: Yes
                                                      Gerrit-Has-Labels: No
                                                      Comment-In-Reply-To: Kristian H. Kristensen <hoeg...@chromium.org>
                                                      Gerrit-MessageType: comment

                                                      Satyajit Sahu (Gerrit)

                                                      unread,
                                                      Apr 11, 2018, 2:47:05 AM4/11/18
                                                      to Dominik Behr, Stéphane Marchesin, Akshu Agrawal, Deepak Sharma, Gurchetan Singh, Marek Olšák, Drew Davenport, Kristian H. Kristensen

                                                      Satyajit Sahu uploaded patch set #19 to this change.

                                                      View Change

                                                      minigbm: using dri extensions

                                                      addrlib dependency removed. dri extensions are called instead.
                                                      dri.c/dri.h implements the generic dri extensions call.
                                                      amdgpu.c implements amdgpu specific.

                                                      BUG=b:72972511
                                                      TEST=Chrome booted to UI and passed graphics_Gbm autotest
                                                      CQ-DEPEND=CL:970222


                                                      Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                      Signed-off-by: Satyajit <satyaj...@amd.com>
                                                      ---
                                                      M Makefile
                                                      M amdgpu.c
                                                      A dri.c
                                                      A dri.h
                                                      M drv_priv.h
                                                      5 files changed, 402 insertions(+), 333 deletions(-)

                                                      To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                      Gerrit-Project: chromiumos/platform/minigbm
                                                      Gerrit-Branch: master
                                                      Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                      Gerrit-Change-Number: 863723
                                                      Gerrit-PatchSet: 19
                                                      Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                                      Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                                      Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                                      Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                                      Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                                      Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                                      Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                                      Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                                      Gerrit-CC: Kristian H. Kristensen <hoeg...@chromium.org>
                                                      Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                                      Gerrit-MessageType: newpatchset

                                                      Gurchetan Singh (Gerrit)

                                                      unread,
                                                      Apr 11, 2018, 1:07:43 PM4/11/18
                                                      to Satyajit Sahu, Dominik Behr, Stéphane Marchesin, Akshu Agrawal, Deepak Sharma, Marek Olšák, Drew Davenport, Kristian H. Kristensen

                                                      Gurchetan Singh uploaded patch set #20 to the change originally created by Satyajit Sahu.

                                                      View Change

                                                      minigbm: using dri extensions

                                                      addrlib dependency removed. dri extensions are called instead.
                                                      dri.c/dri.h implements the generic dri extensions call.
                                                      amdgpu.c implements amdgpu specific.

                                                      BUG=b:72972511
                                                      TEST=Chrome booted to UI and passed graphics_Gbm autotest
                                                      CQ-DEPEND=CL:970222

                                                      Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                      Signed-off-by: Satyajit <satyaj...@amd.com>
                                                      ---
                                                      M Makefile
                                                      M amdgpu.c
                                                      A dri.c
                                                      A dri.h
                                                      M drv_priv.h
                                                      5 files changed, 431 insertions(+), 332 deletions(-)

                                                      To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                      Gerrit-Project: chromiumos/platform/minigbm
                                                      Gerrit-Branch: master
                                                      Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                      Gerrit-Change-Number: 863723
                                                      Gerrit-PatchSet: 20

                                                      Gurchetan Singh (Gerrit)

                                                      unread,
                                                      Apr 11, 2018, 1:12:55 PM4/11/18
                                                      to Satyajit Sahu, Kristian H. Kristensen, Stéphane Marchesin, Marek Olšák, Drew Davenport, Dominik Behr, Deepak Sharma, Akshu Agrawal

                                                      Yes, unfortunately, DRM_IOCTL_AMDGPU_GEM_MMAP doesn't detile at kernel level like other drivers do. We can avoid some of the cost associated with this interface by making sure all linear formats skip the dri path, as patch set 20 does.

                                                      Satyajit@, you also mentioned to get atomictest -t test_underlay to work, you needed to change the stride:

                                                      "And map returns a bigger stride. Which causes some corruption."

                                                      However, patchset 19 didn't include any changes to the stride. Do you still need this to get atomictest -t test_underlay to work?

                                                      View Change

                                                        To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                        Gerrit-Project: chromiumos/platform/minigbm
                                                        Gerrit-Branch: master
                                                        Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                        Gerrit-Change-Number: 863723
                                                        Gerrit-PatchSet: 20
                                                        Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                                        Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                                        Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                                        Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                                        Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                                        Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                                        Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                                        Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                                        Gerrit-CC: Kristian H. Kristensen <hoeg...@chromium.org>
                                                        Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                                        Gerrit-Comment-Date: Wed, 11 Apr 2018 17:12:48 +0000

                                                        Gurchetan Singh (Gerrit)

                                                        unread,
                                                        Apr 11, 2018, 1:15:41 PM4/11/18
                                                        to Satyajit Sahu, Dominik Behr, Stéphane Marchesin, Akshu Agrawal, Deepak Sharma, Marek Olšák, Drew Davenport, Kristian H. Kristensen

                                                        Gurchetan Singh uploaded patch set #21 to the change originally created by Satyajit Sahu.

                                                        View Change

                                                        minigbm: using dri extensions

                                                        addrlib dependency removed. dri extensions are called instead.
                                                        dri.c/dri.h implements the generic dri extensions call.
                                                        amdgpu.c implements amdgpu specific.

                                                        BUG=b:72972511
                                                        TEST=Chrome booted to UI and passed graphics_Gbm autotest
                                                        CQ-DEPEND=CL:970222

                                                        Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                        Signed-off-by: Satyajit <satyaj...@amd.com>
                                                        ---
                                                        M Makefile
                                                        M amdgpu.c
                                                        A dri.c
                                                        A dri.h
                                                        M drv_priv.h
                                                        5 files changed, 432 insertions(+), 332 deletions(-)

                                                        To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                        Gerrit-Project: chromiumos/platform/minigbm
                                                        Gerrit-Branch: master
                                                        Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                        Gerrit-Change-Number: 863723
                                                        Gerrit-PatchSet: 21
                                                        Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                                        Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                                        Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                                        Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                                        Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                                        Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                                        Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                                        Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                                        Gerrit-CC: Kristian H. Kristensen <hoeg...@chromium.org>
                                                        Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                                        Gerrit-MessageType: newpatchset

                                                        Kristian H. Kristensen (Gerrit)

                                                        unread,
                                                        Apr 11, 2018, 1:54:41 PM4/11/18
                                                        to Satyajit Sahu, Gurchetan Singh, Stéphane Marchesin, Marek Olšák, Drew Davenport, Dominik Behr, Deepak Sharma, Akshu Agrawal

                                                        I think this looks mostly reasonable now. I'd still prefer if we could avoid using the DRI context for mapping, but we can make that change later if it's an issue.

                                                        View Change

                                                        2 comments:

                                                        To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                        Gerrit-Project: chromiumos/platform/minigbm
                                                        Gerrit-Branch: master
                                                        Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                        Gerrit-Change-Number: 863723
                                                        Gerrit-PatchSet: 21
                                                        Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                                        Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                                        Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                                        Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                                        Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                                        Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                                        Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                                        Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                                        Gerrit-CC: Kristian H. Kristensen <hoeg...@chromium.org>
                                                        Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                                        Gerrit-Comment-Date: Wed, 11 Apr 2018 17:54:38 +0000
                                                        Gerrit-HasComments: Yes
                                                        Gerrit-Has-Labels: No
                                                        Gerrit-MessageType: comment

                                                        Gurchetan Singh (Gerrit)

                                                        unread,
                                                        Apr 11, 2018, 2:11:35 PM4/11/18
                                                        to Satyajit Sahu, Dominik Behr, Stéphane Marchesin, Akshu Agrawal, Deepak Sharma, Marek Olšák, Drew Davenport, Kristian H. Kristensen

                                                        Gurchetan Singh uploaded patch set #22 to the change originally created by Satyajit Sahu.

                                                        View Change

                                                        minigbm: using dri extensions

                                                        addrlib dependency removed. dri extensions are called instead.
                                                        dri.c/dri.h implements the generic dri extensions call.
                                                        amdgpu.c implements amdgpu specific.

                                                        BUG=b:72972511
                                                        TEST=Chrome booted to UI and passed graphics_Gbm autotest
                                                        CQ-DEPEND=CL:970222

                                                        Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                        Signed-off-by: Satyajit <satyaj...@amd.com>
                                                        ---
                                                        M Makefile
                                                        M amdgpu.c
                                                        A dri.c
                                                        A dri.h
                                                        M drv_priv.h
                                                        5 files changed, 434 insertions(+), 330 deletions(-)

                                                        To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                        Gerrit-Project: chromiumos/platform/minigbm
                                                        Gerrit-Branch: master
                                                        Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                        Gerrit-Change-Number: 863723
                                                        Gerrit-PatchSet: 22
                                                        Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                                        Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                                        Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                                        Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                                        Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                                        Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                                        Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                                        Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                                        Gerrit-CC: Kristian H. Kristensen <hoeg...@chromium.org>
                                                        Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                                        Gerrit-MessageType: newpatchset

                                                        Gurchetan Singh (Gerrit)

                                                        unread,
                                                        Apr 11, 2018, 2:12:32 PM4/11/18
                                                        to Satyajit Sahu, Kristian H. Kristensen, Stéphane Marchesin, Marek Olšák, Drew Davenport, Dominik Behr, Deepak Sharma, Akshu Agrawal

                                                        View Change

                                                        2 comments:

                                                          • Done

                                                          • #define TILE_TYPE_LINEAR 0 […]

                                                            Done

                                                        To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                        Gerrit-Project: chromiumos/platform/minigbm
                                                        Gerrit-Branch: master
                                                        Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                        Gerrit-Change-Number: 863723
                                                        Gerrit-PatchSet: 22
                                                        Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                                        Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                                        Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                                        Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                                        Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                                        Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                                        Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                                        Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                                        Gerrit-CC: Kristian H. Kristensen <hoeg...@chromium.org>
                                                        Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                                        Gerrit-Comment-Date: Wed, 11 Apr 2018 18:12:30 +0000
                                                        Gerrit-HasComments: Yes
                                                        Gerrit-Has-Labels: No

                                                        Kristian H. Kristensen (Gerrit)

                                                        unread,
                                                        Apr 11, 2018, 2:13:27 PM4/11/18
                                                        to Satyajit Sahu, Gurchetan Singh, Stéphane Marchesin, Marek Olšák, Drew Davenport, Dominik Behr, Deepak Sharma, Akshu Agrawal

                                                        Cool, looks good. Let me give it a spin on my grunt here.

                                                        View Change

                                                          To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                          Gerrit-Project: chromiumos/platform/minigbm
                                                          Gerrit-Branch: master
                                                          Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                          Gerrit-Change-Number: 863723
                                                          Gerrit-PatchSet: 22
                                                          Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                                          Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                                          Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                                          Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                                          Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                                          Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                                          Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                                          Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                                          Gerrit-CC: Kristian H. Kristensen <hoeg...@chromium.org>
                                                          Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                                          Gerrit-Comment-Date: Wed, 11 Apr 2018 18:13:25 +0000

                                                          Gurchetan Singh (Gerrit)

                                                          unread,
                                                          Apr 11, 2018, 6:30:14 PM4/11/18
                                                          to Satyajit Sahu, Kristian H. Kristensen, Stéphane Marchesin, Marek Olšák, Drew Davenport, Dominik Behr, Deepak Sharma, Akshu Agrawal

                                                          Patch Set 22:

                                                          Cool, looks good. Let me give it a spin on my grunt here.

                                                          Here's hoegsberg@'s test results (from another thread)

                                                          "Testing on R67-10564.0.0 on grunt, UI fails to start:

                                                          Crash dump received by crash_reporter
                                                          [19889:19902:0411/122126.869046:ERROR:drm_device.cc(577)] Cannot prepare dumb buffer for mapping: Operation not permitted (1)
                                                          [19889:19902:0411/122126.907403:ERROR:drm_device.cc(577)] Cannot prepare dumb buffer for mapping: Operation not permitted (1)
                                                          [19755:19755:0411/122127.267100:ERROR:object_proxy.cc(617)] Failed to call method: org.chromium.SessionManagerInterface.StartArcMiniContainer: object_path= /org/chromium/SessionManager: org.chromium.SessionManagerInterface.ContainerStartupFail: Starting Android container failed.

                                                          Crash dump received by crash_reporter
                                                          amdgpu_parse_asic_ids: Cannot parse ASIC IDs: Resource temporarily unavailable
                                                          [20103:20103:0411/122128.054912:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process. This error can be safely ignored in VMTests. Try waiting for /proc to be updated.
                                                          amdgpu_parse_asic_ids: Cannot parse ASIC IDs: Resource temporarily unavailable
                                                          [20065:20082:0411/122131.100816:ERROR:object_proxy.cc(617)] Failed to call method: org.chromium.SessionManagerInterface.RetrievePolicyEx: object_path= /org/chromium/SessionManager: org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying"

                                                          Satyajit, can you determine why the UI is not working on grunt? CL:997192 landed in 10554.0.0, so I'm unsure what else could be failing ...

                                                          View Change

                                                            To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                            Gerrit-Project: chromiumos/platform/minigbm
                                                            Gerrit-Branch: master
                                                            Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                            Gerrit-Change-Number: 863723
                                                            Gerrit-PatchSet: 22
                                                            Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                                            Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                                            Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                                            Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                                            Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                                            Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                                            Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                                            Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                                            Gerrit-CC: Kristian H. Kristensen <hoeg...@chromium.org>
                                                            Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                                            Gerrit-Comment-Date: Wed, 11 Apr 2018 22:30:12 +0000

                                                            Kristian H. Kristensen (Gerrit)

                                                            unread,
                                                            Apr 11, 2018, 6:31:37 PM4/11/18
                                                            to Satyajit Sahu, Gurchetan Singh, Stéphane Marchesin, Marek Olšák, Drew Davenport, Dominik Behr, Deepak Sharma, Akshu Agrawal

                                                            Patch Set 22:

                                                            Patch Set 22:

                                                            Cool, looks good. Let me give it a spin on my grunt here.

                                                            Here's hoegsberg@'s test results (from another thread)

                                                            Yikes, I posted that on the wrong CL. Thanks Gurchetan.

                                                            View Change

                                                              To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                              Gerrit-Project: chromiumos/platform/minigbm
                                                              Gerrit-Branch: master
                                                              Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                              Gerrit-Change-Number: 863723
                                                              Gerrit-PatchSet: 22
                                                              Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                                              Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                                              Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                                              Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                                              Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                                              Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                                              Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                                              Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                                              Gerrit-CC: Kristian H. Kristensen <hoeg...@chromium.org>
                                                              Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                                              Gerrit-Comment-Date: Wed, 11 Apr 2018 22:31:35 +0000

                                                              Kristian H. Kristensen (Gerrit)

                                                              unread,
                                                              Apr 11, 2018, 6:32:36 PM4/11/18
                                                              to Satyajit Sahu, Gurchetan Singh, Stéphane Marchesin, Marek Olšák, Drew Davenport, Dominik Behr, Deepak Sharma, Akshu Agrawal

                                                              Drew said that there's a libdrm CL that I need for this to work - I'll give it a try again in a bit.

                                                              View Change

                                                                To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                                Gerrit-Project: chromiumos/platform/minigbm
                                                                Gerrit-Branch: master
                                                                Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                                Gerrit-Change-Number: 863723
                                                                Gerrit-PatchSet: 22
                                                                Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                                                Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                                                Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                                                Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                                                Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                                                Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                                                Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                                                Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                                                Gerrit-CC: Kristian H. Kristensen <hoeg...@chromium.org>
                                                                Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                                                Gerrit-Comment-Date: Wed, 11 Apr 2018 22:32:34 +0000

                                                                Deepak Sharma (Gerrit)

                                                                unread,
                                                                Apr 11, 2018, 6:35:54 PM4/11/18
                                                                to Satyajit Sahu, Gurchetan Singh, Kristian H. Kristensen, Stéphane Marchesin, Marek Olšák, Drew Davenport, Dominik Behr, Akshu Agrawal

                                                                Patch Set 22:

                                                                Patch Set 22:

                                                                Patch Set 22:

                                                                Cool, looks good. Let me give it a spin on my grunt here.

                                                                Here's hoegsberg@'s test results (from another thread)

                                                                Yikes, I posted that on the wrong CL. Thanks Gurchetan.

                                                                I did test this recently , UI was working fine.

                                                                View Change

                                                                  To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                                  Gerrit-Project: chromiumos/platform/minigbm
                                                                  Gerrit-Branch: master
                                                                  Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                                  Gerrit-Change-Number: 863723
                                                                  Gerrit-PatchSet: 22
                                                                  Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                                                  Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                                                  Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                                                  Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                                                  Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                                                  Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                                                  Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                                                  Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                                                  Gerrit-CC: Kristian H. Kristensen <hoeg...@chromium.org>
                                                                  Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                                                  Gerrit-Comment-Date: Wed, 11 Apr 2018 22:35:52 +0000

                                                                  Gurchetan Singh (Gerrit)

                                                                  unread,
                                                                  Apr 11, 2018, 11:13:48 PM4/11/18
                                                                  to Satyajit Sahu, Deepak Sharma, Kristian H. Kristensen, Stéphane Marchesin, Marek Olšák, Drew Davenport, Dominik Behr, Akshu Agrawal

                                                                  Patch Set 22:

                                                                  Patch Set 22:

                                                                  Patch Set 22:

                                                                  Patch Set 22:

                                                                  Cool, looks good. Let me give it a spin on my grunt here.

                                                                  Here's hoegsberg@'s test results (from another thread)

                                                                  Yikes, I posted that on the wrong CL. Thanks Gurchetan.

                                                                  I did test this recently , UI was working fine.

                                                                  Cool, if crrev.com/c/981872 (atomictest -t video_underlay) works on Kahlee/Grunt without having to change the stride at mmap time, we should be good. Let me know.

                                                                  View Change

                                                                    To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                                    Gerrit-Project: chromiumos/platform/minigbm
                                                                    Gerrit-Branch: master
                                                                    Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                                    Gerrit-Change-Number: 863723
                                                                    Gerrit-PatchSet: 22
                                                                    Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                                                    Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                                                    Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                                                    Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                                                    Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                                                    Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                                                    Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                                                    Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                                                    Gerrit-CC: Kristian H. Kristensen <hoeg...@chromium.org>
                                                                    Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                                                    Gerrit-Comment-Date: Thu, 12 Apr 2018 03:13:45 +0000

                                                                    Satyajit Sahu (Gerrit)

                                                                    unread,
                                                                    Apr 12, 2018, 7:16:31 AM4/12/18
                                                                    to Gurchetan Singh, Deepak Sharma, Kristian H. Kristensen, Stéphane Marchesin, Marek Olšák, Drew Davenport, Dominik Behr, Akshu Agrawal

                                                                    Patch Set 22:

                                                                    Patch Set 22:

                                                                    Patch Set 22:

                                                                    Patch Set 22:

                                                                    Patch Set 22:

                                                                    Cool, looks good. Let me give it a spin on my grunt here.

                                                                    Here's hoegsberg@'s test results (from another thread)

                                                                    Yikes, I posted that on the wrong CL. Thanks Gurchetan.

                                                                    I did test this recently , UI was working fine.

                                                                    Cool, if crrev.com/c/981872 (atomictest -t video_underlay) works on Kahlee/Grunt without having to change the stride at mmap time, we should be good. Let me know.

                                                                    UI fails to come up when I tried this patch set.
                                                                    The below change in amdgpu_init seems to be causing the UI failure.
                                                                    use_flags &= ~BO_USE_LINEAR;

                                                                    Also mmap_test -g fails because of below
                                                                    use_flags &= ~BO_USE_SW_WRITE_OFTEN;
                                                                    use_flags &= ~BO_USE_SW_READ_OFTEN;

                                                                    View Change

                                                                      To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                                      Gerrit-Project: chromiumos/platform/minigbm
                                                                      Gerrit-Branch: master
                                                                      Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                                      Gerrit-Change-Number: 863723
                                                                      Gerrit-PatchSet: 22
                                                                      Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                                                      Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                                                      Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                                                      Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                                                      Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                                                      Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                                                      Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                                                      Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                                                      Gerrit-CC: Kristian H. Kristensen <hoeg...@chromium.org>
                                                                      Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                                                      Gerrit-Comment-Date: Thu, 12 Apr 2018 11:16:24 +0000

                                                                      Satyajit Sahu (Gerrit)

                                                                      unread,
                                                                      Apr 12, 2018, 7:25:31 AM4/12/18
                                                                      to Gurchetan Singh, Deepak Sharma, Kristian H. Kristensen, Stéphane Marchesin, Marek Olšák, Drew Davenport, Dominik Behr, Akshu Agrawal

                                                                      Patch Set 20:

                                                                      Yes, unfortunately, DRM_IOCTL_AMDGPU_GEM_MMAP doesn't detile at kernel level like other drivers do. We can avoid some of the cost associated with this interface by making sure all linear formats skip the dri path, as patch set 20 does.

                                                                      Satyajit@, you also mentioned to get atomictest -t test_underlay to work, you needed to change the stride:

                                                                      "And map returns a bigger stride. Which causes some corruption."

                                                                      However, patchset 19 didn't include any changes to the stride. Do you still need this to get atomictest -t test_underlay to work?

                                                                      The corruption was not related to the stride changes. The corruption is a random. I have attached the snapshot in the issue tracker.

                                                                      View Change

                                                                        To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                                        Gerrit-Project: chromiumos/platform/minigbm
                                                                        Gerrit-Branch: master
                                                                        Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                                        Gerrit-Change-Number: 863723
                                                                        Gerrit-PatchSet: 22
                                                                        Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                                                        Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                                                        Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                                                        Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                                                        Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                                                        Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                                                        Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                                                        Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                                                        Gerrit-CC: Kristian H. Kristensen <hoeg...@chromium.org>
                                                                        Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                                                        Gerrit-Comment-Date: Thu, 12 Apr 2018 11:25:27 +0000

                                                                        Gurchetan Singh (Gerrit)

                                                                        unread,
                                                                        Apr 12, 2018, 12:26:57 PM4/12/18
                                                                        to Satyajit Sahu, Deepak Sharma, Kristian H. Kristensen, Stéphane Marchesin, Marek Olšák, Drew Davenport, Dominik Behr, Akshu Agrawal

                                                                        Patch Set 22:

                                                                        Patch Set 22:

                                                                        Patch Set 22:

                                                                        Patch Set 22:

                                                                        Patch Set 22:

                                                                        Patch Set 22:

                                                                        Cool, looks good. Let me give it a spin on my grunt here.

                                                                        Here's hoegsberg@'s test results (from another thread)

                                                                        Yikes, I posted that on the wrong CL. Thanks Gurchetan.

                                                                        I did test this recently , UI was working fine.

                                                                        Cool, if crrev.com/c/981872 (atomictest -t video_underlay) works on Kahlee/Grunt without having to change the stride at mmap time, we should be good. Let me know.

                                                                        UI fails to come up when I tried this patch set.
                                                                        The below change in amdgpu_init seems to be causing the UI failure.
                                                                        use_flags &= ~BO_USE_LINEAR;

                                                                        Also mmap_test -g fails because of below
                                                                        use_flags &= ~BO_USE_SW_WRITE_OFTEN;
                                                                        use_flags &= ~BO_USE_SW_READ_OFTEN;

                                                                        What error are you getting when you run the test? Just corruption on screen?

                                                                        This implies allocating linear buffers with the non-dri path is broken. For example, mmap_test -g uses these use flags:

                                                                        case 'g':
                                                                        ctx.mapper = bs_mapper_gem_new();
                                                                        flags |= GBM_BO_USE_SW_READ_OFTEN | GBM_BO_USE_SW_WRITE_OFTEN;

                                                                        Can you debug? We essentially want to allocate linear buffers on AMDGPU, without using addrlib or dri.

                                                                        View Change

                                                                          To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                                          Gerrit-Project: chromiumos/platform/minigbm
                                                                          Gerrit-Branch: master
                                                                          Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                                          Gerrit-Change-Number: 863723
                                                                          Gerrit-PatchSet: 22
                                                                          Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                                                          Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                                                          Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                                                          Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                                                          Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                                                          Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                                                          Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                                                          Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                                                          Gerrit-CC: Kristian H. Kristensen <hoeg...@chromium.org>
                                                                          Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                                                          Gerrit-Comment-Date: Thu, 12 Apr 2018 16:26:55 +0000

                                                                          Satyajit Sahu (Gerrit)

                                                                          unread,
                                                                          Apr 13, 2018, 4:46:12 AM4/13/18
                                                                          to Dominik Behr, Stéphane Marchesin, Akshu Agrawal, Deepak Sharma, Gurchetan Singh, Marek Olšák, Drew Davenport, Kristian H. Kristensen

                                                                          Satyajit Sahu uploaded patch set #23 to this change.

                                                                          View Change

                                                                          minigbm: using dri extensions

                                                                          addrlib dependency removed. dri extensions are called instead.
                                                                          dri.c/dri.h implements the generic dri extensions call.
                                                                          amdgpu.c implements amdgpu specific.

                                                                          BUG=b:72972511
                                                                          TEST=Chrome booted to UI and passed graphics_Gbm autotest
                                                                          CQ-DEPEND=CL:970222

                                                                          Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                                          Signed-off-by: Satyajit <satyaj...@amd.com>
                                                                          ---
                                                                          M Makefile
                                                                          M amdgpu.c
                                                                          A dri.c
                                                                          A dri.h
                                                                          M drv_priv.h
                                                                          M helpers.c
                                                                          6 files changed, 449 insertions(+), 345 deletions(-)

                                                                          To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                                          Gerrit-Project: chromiumos/platform/minigbm
                                                                          Gerrit-Branch: master
                                                                          Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                                          Gerrit-Change-Number: 863723
                                                                          Gerrit-PatchSet: 23
                                                                          Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                                                          Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                                                          Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                                                          Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                                                          Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                                                          Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                                                          Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                                                          Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                                                          Gerrit-CC: Kristian H. Kristensen <hoeg...@chromium.org>
                                                                          Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                                                          Gerrit-MessageType: newpatchset

                                                                          Satyajit Sahu (Gerrit)

                                                                          unread,
                                                                          Apr 13, 2018, 4:48:15 AM4/13/18
                                                                          to Gurchetan Singh, Deepak Sharma, Kristian H. Kristensen, Stéphane Marchesin, Marek Olšák, Drew Davenport, Dominik Behr, Akshu Agrawal

                                                                          Patch Set 22:

                                                                          Patch Set 22:

                                                                          Patch Set 22:

                                                                          Patch Set 22:

                                                                          Patch Set 22:

                                                                          Patch Set 22:

                                                                          Patch Set 22:

                                                                          Cool, looks good. Let me give it a spin on my grunt here.

                                                                          Here's hoegsberg@'s test results (from another thread)

                                                                          Yikes, I posted that on the wrong CL. Thanks Gurchetan.

                                                                          I did test this recently , UI was working fine.

                                                                          Cool, if crrev.com/c/981872 (atomictest -t video_underlay) works on Kahlee/Grunt without having to change the stride at mmap time, we should be good. Let me know.

                                                                          UI fails to come up when I tried this patch set.
                                                                          The below change in amdgpu_init seems to be causing the UI failure.
                                                                          use_flags &= ~BO_USE_LINEAR;

                                                                          Also mmap_test -g fails because of below
                                                                          use_flags &= ~BO_USE_SW_WRITE_OFTEN;
                                                                          use_flags &= ~BO_USE_SW_READ_OFTEN;

                                                                          What error are you getting when you run the test? Just corruption on screen?

                                                                          This implies allocating linear buffers with the non-dri path is broken. For example, mmap_test -g uses these use flags:

                                                                          case 'g':
                                                                          ctx.mapper = bs_mapper_gem_new();
                                                                          flags |= GBM_BO_USE_SW_READ_OFTEN | GBM_BO_USE_SW_WRITE_OFTEN;

                                                                          Can you debug? We essentially want to allocate linear buffers on AMDGPU, without using addrlib or dri.

                                                                          subsample_stride calculation was not proper for RGB buffers. Modified and uploaded patchset 3. With this modification UI comes up and mmap_test -g also proper.

                                                                          View Change

                                                                            To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                                            Gerrit-Project: chromiumos/platform/minigbm
                                                                            Gerrit-Branch: master
                                                                            Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                                            Gerrit-Change-Number: 863723
                                                                            Gerrit-PatchSet: 23
                                                                            Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                                                            Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                                                            Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                                                            Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                                                            Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                                                            Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                                                            Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                                                            Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                                                            Gerrit-CC: Kristian H. Kristensen <hoeg...@chromium.org>
                                                                            Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                                                            Gerrit-Comment-Date: Fri, 13 Apr 2018 08:48:10 +0000

                                                                            Satyajit Sahu (Gerrit)

                                                                            unread,
                                                                            Apr 13, 2018, 6:16:37 AM4/13/18
                                                                            to Dominik Behr, Stéphane Marchesin, Akshu Agrawal, Deepak Sharma, Gurchetan Singh, Marek Olšák, Drew Davenport, Kristian H. Kristensen

                                                                            Satyajit Sahu uploaded patch set #24 to this change.

                                                                            View Change

                                                                            minigbm: using dri extensions

                                                                            addrlib dependency removed. dri extensions are called instead.
                                                                            dri.c/dri.h implements the generic dri extensions call.
                                                                            amdgpu.c implements amdgpu specific.

                                                                            BUG=b:72972511
                                                                            TEST=Chrome booted to UI and passed graphics_Gbm autotest
                                                                            CQ-DEPEND=CL:970222

                                                                            Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                                            Signed-off-by: Satyajit <satyaj...@amd.com>
                                                                            ---
                                                                            M Makefile
                                                                            M amdgpu.c
                                                                            A dri.c
                                                                            A dri.h
                                                                            M drv_priv.h
                                                                            M helpers.c
                                                                            6 files changed, 452 insertions(+), 345 deletions(-)

                                                                            To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                                            Gerrit-Project: chromiumos/platform/minigbm
                                                                            Gerrit-Branch: master
                                                                            Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                                            Gerrit-Change-Number: 863723
                                                                            Gerrit-PatchSet: 24
                                                                            Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                                                            Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                                                            Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                                                            Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                                                            Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                                                            Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                                                            Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                                                            Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                                                            Gerrit-CC: Kristian H. Kristensen <hoeg...@chromium.org>
                                                                            Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                                                            Gerrit-MessageType: newpatchset

                                                                            Satyajit Sahu (Gerrit)

                                                                            unread,
                                                                            Apr 13, 2018, 7:24:26 AM4/13/18
                                                                            to Dominik Behr, Stéphane Marchesin, Akshu Agrawal, Deepak Sharma, Gurchetan Singh, Marek Olšák, Drew Davenport, Kristian H. Kristensen

                                                                            Satyajit Sahu uploaded patch set #25 to this change.

                                                                            View Change

                                                                            minigbm: using dri extensions

                                                                            addrlib dependency removed. dri extensions are called instead.
                                                                            dri.c/dri.h implements the generic dri extensions call.
                                                                            amdgpu.c implements amdgpu specific.

                                                                            BUG=b:72972511
                                                                            TEST=Chrome booted to UI and passed graphics_Gbm autotest
                                                                            CQ-DEPEND=CL:970222

                                                                            Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                                            Signed-off-by: Satyajit <satyaj...@amd.com>
                                                                            ---
                                                                            M Makefile
                                                                            M amdgpu.c
                                                                            A dri.c
                                                                            A dri.h
                                                                            M drv_priv.h
                                                                            M helpers.c
                                                                            6 files changed, 449 insertions(+), 345 deletions(-)

                                                                            To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                                            Gerrit-Project: chromiumos/platform/minigbm
                                                                            Gerrit-Branch: master
                                                                            Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                                            Gerrit-Change-Number: 863723
                                                                            Gerrit-PatchSet: 25

                                                                            Gurchetan Singh (Gerrit)

                                                                            unread,
                                                                            Apr 13, 2018, 11:30:16 AM4/13/18
                                                                            to Satyajit Sahu, Dominik Behr, Stéphane Marchesin, Akshu Agrawal, Deepak Sharma, Marek Olšák, Drew Davenport, Kristian H. Kristensen

                                                                            Gurchetan Singh uploaded patch set #26 to the change originally created by Satyajit Sahu.

                                                                            View Change

                                                                            minigbm: using dri extensions

                                                                            addrlib dependency removed. dri extensions are called instead.
                                                                            dri.c/dri.h implements the generic dri extensions call.
                                                                            amdgpu.c implements amdgpu specific.

                                                                            BUG=b:72972511
                                                                            TEST=Chrome booted to UI and passed graphics_Gbm autotest
                                                                            CQ-DEPEND=CL:970222

                                                                            Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                                            Signed-off-by: Satyajit <satyaj...@amd.com>
                                                                            ---
                                                                            M Makefile
                                                                            M amdgpu.c
                                                                            A dri.c
                                                                            A dri.h
                                                                            M drv_priv.h
                                                                            5 files changed, 437 insertions(+), 329 deletions(-)

                                                                            To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                                            Gerrit-Project: chromiumos/platform/minigbm
                                                                            Gerrit-Branch: master
                                                                            Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                                            Gerrit-Change-Number: 863723
                                                                            Gerrit-PatchSet: 26

                                                                            Gurchetan Singh (Gerrit)

                                                                            unread,
                                                                            Apr 13, 2018, 11:31:35 AM4/13/18
                                                                            to Satyajit Sahu, Deepak Sharma, Kristian H. Kristensen, Stéphane Marchesin, Marek Olšák, Drew Davenport, Dominik Behr, Akshu Agrawal

                                                                            The problem is drv_bo_from_format expects the stride, not the width. Makes sense why it wasn't working for 4bpp formats. It should work now. Satyajit, test once more and if everything passes please land this.

                                                                            Patch set 26:Code-Review +2

                                                                            View Change

                                                                              To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                                              Gerrit-Project: chromiumos/platform/minigbm
                                                                              Gerrit-Branch: master
                                                                              Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                                              Gerrit-Change-Number: 863723
                                                                              Gerrit-PatchSet: 26
                                                                              Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                                                              Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                                                              Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                                                              Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                                                              Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                                                              Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                                                              Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                                                              Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                                                              Gerrit-CC: Kristian H. Kristensen <hoeg...@chromium.org>
                                                                              Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                                                              Gerrit-Comment-Date: Fri, 13 Apr 2018 15:31:28 +0000
                                                                              Gerrit-HasComments: No
                                                                              Gerrit-Has-Labels: Yes
                                                                              Gerrit-MessageType: comment

                                                                              Satyajit Sahu (Gerrit)

                                                                              unread,
                                                                              Apr 16, 2018, 12:50:57 AM4/16/18
                                                                              to Gurchetan Singh, Deepak Sharma, Kristian H. Kristensen, Stéphane Marchesin, Marek Olšák, Drew Davenport, Dominik Behr, Akshu Agrawal

                                                                              Patch set 26:Verified +1

                                                                              View Change

                                                                                To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                                                Gerrit-Project: chromiumos/platform/minigbm
                                                                                Gerrit-Branch: master
                                                                                Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                                                Gerrit-Change-Number: 863723
                                                                                Gerrit-PatchSet: 26
                                                                                Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                                                                Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                                                                Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                                                                Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                                                                Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                                                                Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                                                                Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                                                                Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                                                                Gerrit-CC: Kristian H. Kristensen <hoeg...@chromium.org>
                                                                                Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                                                                Gerrit-Comment-Date: Mon, 16 Apr 2018 04:50:46 +0000

                                                                                Satyajit Sahu (Gerrit)

                                                                                unread,
                                                                                Apr 16, 2018, 12:51:15 AM4/16/18
                                                                                to Gurchetan Singh, Deepak Sharma, Kristian H. Kristensen, Stéphane Marchesin, Marek Olšák, Drew Davenport, Dominik Behr, Akshu Agrawal

                                                                                Patch set 26:Commit-Queue +1

                                                                                View Change

                                                                                  To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                                                  Gerrit-Project: chromiumos/platform/minigbm
                                                                                  Gerrit-Branch: master
                                                                                  Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                                                  Gerrit-Change-Number: 863723
                                                                                  Gerrit-PatchSet: 26
                                                                                  Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                                                                  Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                                                                  Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                                                                  Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                                                                  Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                                                                  Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                                                                  Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                                                                  Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                                                                  Gerrit-CC: Kristian H. Kristensen <hoeg...@chromium.org>
                                                                                  Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                                                                  Gerrit-Comment-Date: Mon, 16 Apr 2018 04:51:12 +0000

                                                                                  Satyajit Sahu (Gerrit)

                                                                                  unread,
                                                                                  Apr 16, 2018, 1:50:05 AM4/16/18
                                                                                  to Dominik Behr, Stéphane Marchesin, Akshu Agrawal, Deepak Sharma, Gurchetan Singh, ChromeOS Commit Bot, Marek Olšák, Drew Davenport, Kristian H. Kristensen

                                                                                  Satyajit Sahu uploaded patch set #27 to this change.

                                                                                  View Change

                                                                                  minigbm: using dri extensions

                                                                                  addrlib dependency removed. dri extensions are called instead.
                                                                                  dri.c/dri.h implements the generic dri extensions call.
                                                                                  amdgpu.c implements amdgpu specific.

                                                                                  BUG=b:72972511
                                                                                  TEST=Chrome booted to UI and passed graphics_Gbm autotest

                                                                                  Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                                                  Signed-off-by: Satyajit <satyaj...@amd.com>
                                                                                  ---
                                                                                  M Makefile
                                                                                  M amdgpu.c
                                                                                  A dri.c
                                                                                  A dri.h
                                                                                  M drv_priv.h
                                                                                  5 files changed, 437 insertions(+), 329 deletions(-)

                                                                                  To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                                                  Gerrit-Project: chromiumos/platform/minigbm
                                                                                  Gerrit-Branch: master
                                                                                  Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                                                  Gerrit-Change-Number: 863723
                                                                                  Gerrit-PatchSet: 27
                                                                                  Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                                                                  Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                                                                  Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                                                                  Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                                                                  Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                                                                  Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                                                                  Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                                                                  Gerrit-CC: ChromeOS Commit Bot <chromeos-...@chromium.org>
                                                                                  Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                                                                  Gerrit-CC: Kristian H. Kristensen <hoeg...@chromium.org>
                                                                                  Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                                                                  Gerrit-MessageType: newpatchset

                                                                                  Satyajit Sahu (Gerrit)

                                                                                  unread,
                                                                                  Apr 16, 2018, 1:50:40 AM4/16/18
                                                                                  to ChromeOS Commit Bot, Gurchetan Singh, Deepak Sharma, Kristian H. Kristensen, Stéphane Marchesin, Marek Olšák, Drew Davenport, Dominik Behr, Akshu Agrawal

                                                                                  Patch set 27:Verified +1

                                                                                  View Change

                                                                                    To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                                                    Gerrit-Project: chromiumos/platform/minigbm
                                                                                    Gerrit-Branch: master
                                                                                    Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                                                    Gerrit-Change-Number: 863723
                                                                                    Gerrit-PatchSet: 27
                                                                                    Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                                                                    Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                                                                    Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                                                                    Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                                                                    Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                                                                    Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                                                                    Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                                                                    Gerrit-CC: ChromeOS Commit Bot <chromeos-...@chromium.org>
                                                                                    Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                                                                    Gerrit-CC: Kristian H. Kristensen <hoeg...@chromium.org>
                                                                                    Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                                                                    Gerrit-Comment-Date: Mon, 16 Apr 2018 05:50:37 +0000

                                                                                    Satyajit Sahu (Gerrit)

                                                                                    unread,
                                                                                    Apr 16, 2018, 1:50:57 AM4/16/18
                                                                                    to ChromeOS Commit Bot, Gurchetan Singh, Deepak Sharma, Kristian H. Kristensen, Stéphane Marchesin, Marek Olšák, Drew Davenport, Dominik Behr, Akshu Agrawal

                                                                                    Patch set 27:Commit-Queue +1

                                                                                    View Change

                                                                                      To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                                                      Gerrit-Project: chromiumos/platform/minigbm
                                                                                      Gerrit-Branch: master
                                                                                      Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                                                      Gerrit-Change-Number: 863723
                                                                                      Gerrit-PatchSet: 27
                                                                                      Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                                                                      Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                                                                      Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                                                                      Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                                                                      Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                                                                      Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                                                                      Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                                                                      Gerrit-CC: ChromeOS Commit Bot <chromeos-...@chromium.org>
                                                                                      Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                                                                      Gerrit-CC: Kristian H. Kristensen <hoeg...@chromium.org>
                                                                                      Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                                                                      Gerrit-Comment-Date: Mon, 16 Apr 2018 05:50:53 +0000

                                                                                      ChromeOS bot (Gerrit)

                                                                                      unread,
                                                                                      Apr 16, 2018, 12:22:27 PM4/16/18
                                                                                      to Satyajit Sahu, Dominik Behr, Stéphane Marchesin, Akshu Agrawal, Deepak Sharma, Gurchetan Singh, ChromeOS Commit Bot, Marek Olšák, Drew Davenport, Kristian H. Kristensen

                                                                                      ChromeOS bot uploaded patch set #28 to the change originally created by Satyajit Sahu.

                                                                                      View Change

                                                                                      minigbm: using dri extensions

                                                                                      addrlib dependency removed. dri extensions are called instead.
                                                                                      dri.c/dri.h implements the generic dri extensions call.
                                                                                      amdgpu.c implements amdgpu specific.

                                                                                      BUG=b:72972511
                                                                                      TEST=Chrome booted to UI and passed graphics_Gbm autotest

                                                                                      Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                                                      Signed-off-by: Satyajit <satyaj...@amd.com>
                                                                                      Reviewed-on: https://chromium-review.googlesource.com/863723
                                                                                      Commit-Ready: Satyajit Sahu <satyaj...@amd.com>
                                                                                      Tested-by: Satyajit Sahu <satyaj...@amd.com>
                                                                                      Reviewed-by: Gurchetan Singh <gurchet...@chromium.org>

                                                                                      ---
                                                                                      M Makefile
                                                                                      M amdgpu.c
                                                                                      A dri.c
                                                                                      A dri.h
                                                                                      M drv_priv.h
                                                                                      5 files changed, 437 insertions(+), 329 deletions(-)

                                                                                      To view, visit change 863723. To unsubscribe, or for help writing mail filters, visit settings.

                                                                                      Gerrit-Project: chromiumos/platform/minigbm
                                                                                      Gerrit-Branch: master
                                                                                      Gerrit-Change-Id: Ia0edec7752a258fe2f70bc4838dac6398d46def2
                                                                                      Gerrit-Change-Number: 863723
                                                                                      Gerrit-PatchSet: 28
                                                                                      Gerrit-Owner: Satyajit Sahu <satyaj...@amd.com>
                                                                                      Gerrit-Reviewer: Akshu Agrawal <akshu....@amd.com>
                                                                                      Gerrit-Reviewer: Deepak Sharma <deepak...@amd.com>
                                                                                      Gerrit-Reviewer: Dominik Behr <db...@chromium.org>
                                                                                      Gerrit-Reviewer: Gurchetan Singh <gurchet...@chromium.org>
                                                                                      Gerrit-Reviewer: Satyajit Sahu <satyaj...@amd.com>
                                                                                      Gerrit-Reviewer: Stéphane Marchesin <mar...@chromium.org>
                                                                                      Gerrit-CC: ChromeOS Commit Bot <chromeos-...@chromium.org>
                                                                                      Gerrit-CC: Drew Davenport <ddave...@chromium.org>
                                                                                      Gerrit-CC: Kristian H. Kristensen <hoeg...@chromium.org>
                                                                                      Gerrit-CC: Marek Olšák <mar...@gmail.com>
                                                                                      Gerrit-MessageType: newpatchset

                                                                                      ChromeOS bot (Gerrit)

                                                                                      unread,
                                                                                      Apr 16, 2018, 12:22:27 PM4/16/18
                                                                                      to Satyajit Sahu, ChromeOS Commit Bot, Gurchetan Singh, Deepak Sharma, Kristian H. Kristensen, Stéphane Marchesin, Marek Olšák, Drew Davenport, Dominik Behr, Akshu Agrawal

                                                                                      ChromeOS bot merged this change.

                                                                                      Gerrit-MessageType: merged
                                                                                      Reply all
                                                                                      Reply to author
                                                                                      Forward
                                                                                      0 new messages