ChangeLog | 194 +++++++++++ configure.ac | 2 debian/changelog | 12 exynos/Makefile.am | 6 freedreno/Makefile.am | 10 freedreno/freedreno_ringbuffer.c | 12 freedreno/freedreno_ringbuffer.h | 2 include/drm/radeon_drm.h | 81 ++++ intel/intel_chipset.h | 18 - intel/intel_decode.c | 2 intel/tests/gen6-3d.batch-ref.txt | 6 libkms/api.c | 2 libkms/libkms.h | 8 radeon/radeon_surface.c | 658 +++++++++++++++++++++++++++++++++++--- radeon/radeon_surface.h | 31 + tests/modetest/buffers.c | 195 ++++++++--- tests/modetest/modetest.c | 10 xf86drm.c | 2 xf86mm.h | 198 ----------- 19 files changed, 1138 insertions(+), 311 deletions(-)
New commits: commit fc9887f6609d7247445cce6fd07ba7017fb968b1 Author: Maarten Lankhorst <maarten.lankho...@canonical.com> Date: Fri May 3 08:12:47 2013 +0200 release to saucy diff --git a/debian/changelog b/debian/changelog index 5a47438..b4e5064 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +libdrm (2.4.44-0ubuntu1) saucy; urgency=low + + * Sync from unreleased debian git. + + -- Maarten Lankhorst <maarten.lankho...@ubuntu.com> Thu, 02 May 2013 09:17:38 +0200 + libdrm (2.4.44-1) UNRELEASED; urgency=low [ Julien Cristau ] commit d54a4da2c89a72f308bb56e20265aa11a5093954 Author: Maarten Lankhorst <maarten.lankho...@canonical.com> Date: Thu May 2 09:15:44 2013 +0200 bump changelog diff --git a/ChangeLog b/ChangeLog index 4f07fdb..74b1902 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,197 @@ +commit 9768af201e9aba2093c80a8da3632fe9e4c044fe +Author: Jerome Glisse <jgli...@redhat.com> +Date: Thu Apr 18 15:01:19 2013 -0400 + + libdrm 2.4.44 + +commit 83e77461249d535a77c3ed055d198e26f0c1b390 +Author: Ville Syrjälä <ville.syrj...@linux.intel.com> +Date: Thu Apr 18 15:26:59 2013 +0000 + + modetest: Add YUV420 support and fix YVU420 Cb/Cr ordering + + YUV420 support is trivial to add since the code already supports + YVU420. + + But it looks like the YVU420 support is a bit broken. The chroma + planes are passed in the wrong order to the fill functions, so + fix that while were at it. + + Signed-off-by: Ville Syrjälä <ville.syrj...@linux.intel.com> + +commit 3f024f85d816a648473373bccc8ccc915951886a +Author: Ville Syrjälä <ville.syrj...@linux.intel.com> +Date: Thu Apr 18 15:26:57 2013 +0000 + + modetest: Pass format_info to fill_tiles functions + + The fourcc is inside the format_info structure, so if we want to use + it inside the various fill_tiles functions, we need to pass down the + whole format_info, not just the rgb/yuv infos. + + Signed-off-by: Ville Syrjälä <ville.syrj...@linux.intel.com> + Acked-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com> + +commit 2c26a106fcfb692badef4c42faaed46508a3d1d3 +Author: Ville Syrjälä <ville.syrj...@linux.intel.com> +Date: Wed Apr 17 19:18:05 2013 +0000 + + modetest: Reduce the length of the connector type string + + Spelling out eDP or DP make for a ridicilously long string which plays + havoc with formatting. Just say eDP or DP. + + Signed-off-by: Ville Syrjälä <ville.syrj...@linux.intel.com> + Acked-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com> + +commit 8e56579b203a11c718c5e3da6fdb03b4f9b9fe56 +Author: Ville Syrjälä <ville.syrj...@linux.intel.com> +Date: Wed Apr 17 19:18:04 2013 +0000 + + modetest: Print possible_crtcs for planes + + Signed-off-by: Ville Syrjälä <ville.syrj...@linux.intel.com> + Acked-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com> + +commit fa2925aa342158037ef972f3ef095442fb1fe430 +Author: Ville Syrjälä <ville.syrj...@linux.intel.com> +Date: Wed Apr 17 19:18:03 2013 +0000 + + modetest: Add support for all 16/32 bpp RGB formats + + Signed-off-by: Ville Syrjälä <ville.syrj...@linux.intel.com> + Acked-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com> + +commit c2988eb211ecad2db60081f1000cf19b350703db +Author: Ville Syrjälä <ville.syrj...@linux.intel.com> +Date: Wed Apr 17 19:18:02 2013 +0000 + + modetest: Fix pitches, somewhat + + libkms only has the xrgb8888 format, so we're overallocating the bo by + quite a lot in some cases. But we still need to get the pitch from the + libkms since it's the driver that decides how to align it. + + Signed-off-by: Ville Syrjälä <ville.syrj...@linux.intel.com> + Acked-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com> + +commit aa4afdf0b3be20aa6037b64f90983ea0146b2893 +Author: Laurent Pinchart <laurent.pinch...@ideasonboard.com> +Date: Thu Nov 1 09:38:42 2012 +0000 + + kms: Return a negative error code in kms_bo_create() + + The function returns returns 0 on success or a negative value in case of an + error, except when given invalid attributes in which case it returns the + positive EINVAL value. Replace that with -EINVAL to allow the caller to detect + errors with a < 0 check. + + Signed-off-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com> + Reviewed-by: Jakob Bornecrantz <wallbra...@gmail.com> + +commit 9fa4a4b1a894fa8fffe2075bc3376b7fa5e18104 +Author: Laurent Pinchart <laurent.pinch...@ideasonboard.com> +Date: Thu Nov 1 09:40:30 2012 +0000 + + kms: Make libkms.h usable in C++ + + Wrap the header in extern "C" { ... };. + + Signed-off-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com> + Reviewed-by: Jakob Bornecrantz <wallbra...@gmail.com> + +commit e5d8a9c1d6375feb74feb52f419a025f1abf94d1 +Author: Rob Clark <robdcl...@gmail.com> +Date: Fri Apr 12 11:28:13 2013 -0400 + + freedreno: add shifted reloc + + Needed for RB_COPY_DEST_BASE register on a3xx. + + Signed-off-by: Rob Clark <robdcl...@gmail.com> + +commit a36cdb858e21f287d7b51ded2f211f1c84bda90b +Author: Jerome Glisse <jgli...@redhat.com> +Date: Mon Apr 8 13:35:37 2013 -0400 + + radeon: add si tiling support v5 + + v2: Only writte tile index if flags for it is set + v3: Remove useless allow2d scanout flags + v4: Split radeon_drm.h update to its own patch + v5: update against lastest next tree for radeon + + Signed-off-by: Jerome Glisse <jgli...@redhat.com> + Reviewed-by: Michel Dänzer <michel.daen...@amd.com> + +commit 309cb649a380d25a0eced4f3a0edb55d6b577099 +Author: Jerome Glisse <jgli...@redhat.com> +Date: Mon Apr 8 13:34:54 2013 -0400 + + radeon: update radeon_drm.h to kernel last API additions v2 + + v2: sync with radeon-next tree for 3.10 + + http://cgit.freedesktop.org/~agd5f/linux/log/?h=drm-next-3.10-wip + + Signed-off-by: Jerome Glisse <jgli...@redhat.com> + Reviewed-by: Christian König <christian.koe...@amd.com> + +commit b7bb9e929786eb8bae86cf50f54dcb94bfa7ad46 +Author: Daniel Vetter <daniel.vet...@ffwll.ch> +Date: Wed Apr 3 18:25:12 2013 +0200 + + intel-decode: Fix gen6 HIER_DEPTH_BUFFER decoding + + It accidentally used the cmd id for the gen7 command and had an + outdated lenght field. Spotted while trying to make sense of an ivb + error_state from mesa 7.11 ... + + Reviewed-by: Eric Anholt <e...@anholt.net> + Signed-off-by: Daniel Vetter <daniel.vet...@ffwll.ch> + +commit ca678bc073462623cfc89dea80271bc361f1655f +Author: Kenneth Graunke <kenn...@whitecape.org> +Date: Fri Mar 1 15:37:01 2013 -0800 + + intel: Fix Haswell CRW PCI IDs. + + The second digit was off by one, which meant we accidentally treated + GT(n) as GT(n-1). This also meant no support for GT1 at all. + + Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> + +commit 1eb2860b4bd0306dddc5b2f2dc7403aa65c5e476 +Author: Daniel Kurtz <djku...@chromium.org> +Date: Thu Mar 28 14:05:40 2013 +0800 + + drm: Fix error message in drmWaitVBlank + + If clock_gettime did fail, it would return -1 and set errno. + What we really want to strerror() is the errno. + + Signed-off-by: Daniel Kurtz <djku...@chromium.org> + +commit 99105e765c31b598746b849e66e7a9106dcefa24 +Author: Maarten Lankhorst <maarten.lankho...@canonical.com> +Date: Wed Mar 27 14:06:43 2013 +0100 + + makefiles: Add missing headers. + + I even compile time tested this on a panda with make dist! + + Signed-off-by: Maarten Lankhorst <maarten.lankho...@canonical.com> + +commit 6113c3daa8826a11546693af07dee3313e09a167 +Author: Maarten Lankhorst <maarten.lankho...@canonical.com> +Date: Wed Mar 27 13:55:54 2013 +0100 + + Remove unused header xf86mm.h. + + it's not even shipped in the tarball. + + Signed-off-by: Maarten Lankhorst <maarten.lankho...@canonical.com> + commit c005f043dcb4df5ed8a36b9f4b70fcf9e92d52a5 Author: Maarten Lankhorst <maarten.lankho...@canonical.com> Date: Wed Mar 27 10:42:20 2013 +0100 diff --git a/debian/changelog b/debian/changelog index 8f03c70..51073b4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -libdrm (2.4.43-1) UNRELEASED; urgency=low +libdrm (2.4.44-1) UNRELEASED; urgency=low [ Julien Cristau ] * Bump libdrm2 shlibs to 2.4.38. commit 9768af201e9aba2093c80a8da3632fe9e4c044fe Author: Jerome Glisse <jgli...@redhat.com> Date: Thu Apr 18 15:01:19 2013 -0400 libdrm 2.4.44 diff --git a/configure.ac b/configure.ac index 2786c87..803d99d 100644 --- a/configure.ac +++ b/configure.ac @@ -20,7 +20,7 @@ AC_PREREQ([2.63]) AC_INIT([libdrm], - [2.4.43], + [2.4.44], [https://bugs.freedesktop.org/enter_bug.cgi?product=DRI], [libdrm]) commit 83e77461249d535a77c3ed055d198e26f0c1b390 Author: Ville Syrjälä <ville.syrj...@linux.intel.com> Date: Thu Apr 18 15:26:59 2013 +0000 modetest: Add YUV420 support and fix YVU420 Cb/Cr ordering YUV420 support is trivial to add since the code already supports YVU420. But it looks like the YVU420 support is a bit broken. The chroma planes are passed in the wrong order to the fill functions, so fix that while were at it. Signed-off-by: Ville Syrjälä <ville.syrj...@linux.intel.com> diff --git a/tests/modetest/buffers.c b/tests/modetest/buffers.c index 2f3adf8..9b2bf72 100644 --- a/tests/modetest/buffers.c +++ b/tests/modetest/buffers.c @@ -100,6 +100,7 @@ static const struct format_info format_info[] = { { DRM_FORMAT_NV16, "NV16", MAKE_YUV_INFO(YUV_YCbCr, 2, 1, 2) }, { DRM_FORMAT_NV61, "NV61", MAKE_YUV_INFO(YUV_YCrCb, 2, 1, 2) }, /* YUV planar */ + { DRM_FORMAT_YUV420, "YU12", MAKE_YUV_INFO(YUV_YCbCr, 2, 2, 1) }, { DRM_FORMAT_YVU420, "YV12", MAKE_YUV_INFO(YUV_YCrCb, 2, 2, 1) }, /* RGB16 */ { DRM_FORMAT_ARGB4444, "AR12", MAKE_RGB_INFO(4, 8, 4, 4, 4, 0, 4, 12) }, @@ -600,10 +601,14 @@ fill_smpte(const struct format_info *info, void *planes[3], unsigned int width, return fill_smpte_yuv_planar(&info->yuv, planes[0], u, v, width, height, stride); - case DRM_FORMAT_YVU420: + case DRM_FORMAT_YUV420: return fill_smpte_yuv_planar(&info->yuv, planes[0], planes[1], planes[2], width, height, stride); + case DRM_FORMAT_YVU420: + return fill_smpte_yuv_planar(&info->yuv, planes[0], planes[2], + planes[1], width, height, stride); + case DRM_FORMAT_ARGB4444: case DRM_FORMAT_XRGB4444: case DRM_FORMAT_ABGR4444: @@ -863,10 +868,14 @@ fill_tiles(const struct format_info *info, void *planes[3], unsigned int width, return fill_tiles_yuv_planar(info, planes[0], u, v, width, height, stride); - case DRM_FORMAT_YVU420: + case DRM_FORMAT_YUV420: return fill_tiles_yuv_planar(info, planes[0], planes[1], planes[2], width, height, stride); + case DRM_FORMAT_YVU420: + return fill_tiles_yuv_planar(info, planes[0], planes[2], + planes[1], width, height, stride); + case DRM_FORMAT_ARGB4444: case DRM_FORMAT_XRGB4444: case DRM_FORMAT_ABGR4444: @@ -1055,6 +1064,7 @@ create_test_buffer(struct kms_driver *kms, unsigned int format, planes[1] = virtual + offsets[1]; break; + case DRM_FORMAT_YUV420: case DRM_FORMAT_YVU420: offsets[0] = 0; kms_bo_get_prop(bo, KMS_HANDLE, &handles[0]); commit 3f024f85d816a648473373bccc8ccc915951886a Author: Ville Syrjälä <ville.syrj...@linux.intel.com> Date: Thu Apr 18 15:26:57 2013 +0000 modetest: Pass format_info to fill_tiles functions The fourcc is inside the format_info structure, so if we want to use it inside the various fill_tiles functions, we need to pass down the whole format_info, not just the rgb/yuv infos. Signed-off-by: Ville Syrjälä <ville.syrj...@linux.intel.com> Acked-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com> diff --git a/tests/modetest/buffers.c b/tests/modetest/buffers.c index b249f1f..2f3adf8 100644 --- a/tests/modetest/buffers.c +++ b/tests/modetest/buffers.c @@ -702,11 +702,12 @@ make_pwetty(void *data, int width, int height, int stride) } static void -fill_tiles_yuv_planar(const struct yuv_info *yuv, +fill_tiles_yuv_planar(const struct format_info *info, unsigned char *y_mem, unsigned char *u_mem, unsigned char *v_mem, unsigned int width, unsigned int height, unsigned int stride) { + const struct yuv_info *yuv = &info->yuv; unsigned int cs = yuv->chroma_stride; unsigned int xsub = yuv->xsub; unsigned int ysub = yuv->ysub; @@ -736,10 +737,11 @@ fill_tiles_yuv_planar(const struct yuv_info *yuv, } static void -fill_tiles_yuv_packed(const struct yuv_info *yuv, unsigned char *mem, +fill_tiles_yuv_packed(const struct format_info *info, unsigned char *mem, unsigned int width, unsigned int height, unsigned int stride) { + const struct yuv_info *yuv = &info->yuv; unsigned char *y_mem = (yuv->order & YUV_YC) ? mem : mem + 1; unsigned char *c_mem = (yuv->order & YUV_CY) ? mem : mem + 1; unsigned int u = (yuv->order & YUV_YCrCb) ? 2 : 0; @@ -768,9 +770,10 @@ fill_tiles_yuv_packed(const struct yuv_info *yuv, unsigned char *mem, } static void -fill_tiles_rgb16(const struct rgb_info *rgb, unsigned char *mem, +fill_tiles_rgb16(const struct format_info *info, unsigned char *mem, unsigned int width, unsigned int height, unsigned int stride) { + const struct rgb_info *rgb = &info->rgb; unsigned int x, y; for (y = 0; y < height; ++y) { @@ -790,9 +793,10 @@ fill_tiles_rgb16(const struct rgb_info *rgb, unsigned char *mem, } static void -fill_tiles_rgb24(const struct rgb_info *rgb, unsigned char *mem, +fill_tiles_rgb24(const struct format_info *info, unsigned char *mem, unsigned int width, unsigned int height, unsigned int stride) { + const struct rgb_info *rgb = &info->rgb; unsigned int x, y; for (y = 0; y < height; ++y) { @@ -811,9 +815,10 @@ fill_tiles_rgb24(const struct rgb_info *rgb, unsigned char *mem, } static void -fill_tiles_rgb32(const struct rgb_info *rgb, unsigned char *mem, +fill_tiles_rgb32(const struct format_info *info, unsigned char *mem, unsigned int width, unsigned int height, unsigned int stride) { + const struct rgb_info *rgb = &info->rgb; unsigned char *mem_base = mem; unsigned int x, y; @@ -846,7 +851,7 @@ fill_tiles(const struct format_info *info, void *planes[3], unsigned int width, case DRM_FORMAT_VYUY: case DRM_FORMAT_YUYV: case DRM_FORMAT_YVYU: - return fill_tiles_yuv_packed(&info->yuv, planes[0], + return fill_tiles_yuv_packed(info, planes[0], width, height, stride); case DRM_FORMAT_NV12: @@ -855,11 +860,11 @@ fill_tiles(const struct format_info *info, void *planes[3], unsigned int width, case DRM_FORMAT_NV61: u = info->yuv.order & YUV_YCbCr ? planes[1] : planes[1] + 1; v = info->yuv.order & YUV_YCrCb ? planes[1] : planes[1] + 1; - return fill_tiles_yuv_planar(&info->yuv, planes[0], u, v, + return fill_tiles_yuv_planar(info, planes[0], u, v, width, height, stride); case DRM_FORMAT_YVU420: - return fill_tiles_yuv_planar(&info->yuv, planes[0], planes[1], + return fill_tiles_yuv_planar(info, planes[0], planes[1], planes[2], width, height, stride); case DRM_FORMAT_ARGB4444: @@ -880,12 +885,12 @@ fill_tiles(const struct format_info *info, void *planes[3], unsigned int width, case DRM_FORMAT_RGBX5551: case DRM_FORMAT_BGRA5551: case DRM_FORMAT_BGRX5551: - return fill_tiles_rgb16(&info->rgb, planes[0], + return fill_tiles_rgb16(info, planes[0], width, height, stride); case DRM_FORMAT_BGR888: case DRM_FORMAT_RGB888: - return fill_tiles_rgb24(&info->rgb, planes[0], + return fill_tiles_rgb24(info, planes[0], width, height, stride); case DRM_FORMAT_ARGB8888: case DRM_FORMAT_XRGB8888: @@ -903,7 +908,7 @@ fill_tiles(const struct format_info *info, void *planes[3], unsigned int width, case DRM_FORMAT_RGBX1010102: case DRM_FORMAT_BGRA1010102: case DRM_FORMAT_BGRX1010102: - return fill_tiles_rgb32(&info->rgb, planes[0], + return fill_tiles_rgb32(info, planes[0], width, height, stride); } } commit 2c26a106fcfb692badef4c42faaed46508a3d1d3 Author: Ville Syrjälä <ville.syrj...@linux.intel.com> Date: Wed Apr 17 19:18:05 2013 +0000 modetest: Reduce the length of the connector type string Spelling out eDP or DP make for a ridicilously long string which plays havoc with formatting. Just say eDP or DP. Signed-off-by: Ville Syrjälä <ville.syrj...@linux.intel.com> Acked-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com> diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c index 27cd2ce..8afd2b1 100644 --- a/tests/modetest/modetest.c +++ b/tests/modetest/modetest.c @@ -106,11 +106,11 @@ struct type_name connector_type_names[] = { { DRM_MODE_CONNECTOR_LVDS, "LVDS" }, { DRM_MODE_CONNECTOR_Component, "component" }, { DRM_MODE_CONNECTOR_9PinDIN, "9-pin DIN" }, - { DRM_MODE_CONNECTOR_DisplayPort, "displayport" }, + { DRM_MODE_CONNECTOR_DisplayPort, "DP" }, { DRM_MODE_CONNECTOR_HDMIA, "HDMI-A" }, { DRM_MODE_CONNECTOR_HDMIB, "HDMI-B" }, { DRM_MODE_CONNECTOR_TV, "TV" }, - { DRM_MODE_CONNECTOR_eDP, "embedded displayport" }, + { DRM_MODE_CONNECTOR_eDP, "eDP" }, }; type_name_fn(connector_type) commit 8e56579b203a11c718c5e3da6fdb03b4f9b9fe56 Author: Ville Syrjälä <ville.syrj...@linux.intel.com> Date: Wed Apr 17 19:18:04 2013 +0000 modetest: Print possible_crtcs for planes Signed-off-by: Ville Syrjälä <ville.syrj...@linux.intel.com> Acked-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com> diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c index c91bb9d..27cd2ce 100644 --- a/tests/modetest/modetest.c +++ b/tests/modetest/modetest.c @@ -429,7 +429,7 @@ static void dump_planes(void) } printf("Planes:\n"); - printf("id\tcrtc\tfb\tCRTC x,y\tx,y\tgamma size\n"); + printf("id\tcrtc\tfb\tCRTC x,y\tx,y\tgamma size\tpossible crtcs\n"); for (i = 0; i < plane_resources->count_planes; i++) { ovr = drmModeGetPlane(fd, plane_resources->planes[i]); if (!ovr) { @@ -438,10 +438,10 @@ static void dump_planes(void) continue; } - printf("%d\t%d\t%d\t%d,%d\t\t%d,%d\t%d\n", + printf("%d\t%d\t%d\t%d,%d\t\t%d,%d\t%-8d\t0x%08x\n", ovr->plane_id, ovr->crtc_id, ovr->fb_id, ovr->crtc_x, ovr->crtc_y, ovr->x, ovr->y, - ovr->gamma_size); + ovr->gamma_size, ovr->possible_crtcs); if (!ovr->count_formats) continue; commit fa2925aa342158037ef972f3ef095442fb1fe430 Author: Ville Syrjälä <ville.syrj...@linux.intel.com> Date: Wed Apr 17 19:18:03 2013 +0000 modetest: Add support for all 16/32 bpp RGB formats Signed-off-by: Ville Syrjälä <ville.syrj...@linux.intel.com> Acked-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com> diff --git a/tests/modetest/buffers.c b/tests/modetest/buffers.c index 00269e8..b249f1f 100644 --- a/tests/modetest/buffers.c +++ b/tests/modetest/buffers.c @@ -102,17 +102,44 @@ static const struct format_info format_info[] = { /* YUV planar */ { DRM_FORMAT_YVU420, "YV12", MAKE_YUV_INFO(YUV_YCrCb, 2, 2, 1) }, /* RGB16 */ + { DRM_FORMAT_ARGB4444, "AR12", MAKE_RGB_INFO(4, 8, 4, 4, 4, 0, 4, 12) }, + { DRM_FORMAT_XRGB4444, "XR12", MAKE_RGB_INFO(4, 8, 4, 4, 4, 0, 0, 0) }, + { DRM_FORMAT_ABGR4444, "AB12", MAKE_RGB_INFO(4, 0, 4, 4, 4, 8, 4, 12) }, + { DRM_FORMAT_XBGR4444, "XB12", MAKE_RGB_INFO(4, 0, 4, 4, 4, 8, 0, 0) }, + { DRM_FORMAT_RGBA4444, "RA12", MAKE_RGB_INFO(4, 12, 4, 8, 4, 4, 4, 0) }, + { DRM_FORMAT_RGBX4444, "RX12", MAKE_RGB_INFO(4, 12, 4, 8, 4, 4, 0, 0) }, + { DRM_FORMAT_BGRA4444, "BA12", MAKE_RGB_INFO(4, 4, 4, 8, 4, 12, 4, 0) }, + { DRM_FORMAT_BGRX4444, "BX12", MAKE_RGB_INFO(4, 4, 4, 8, 4, 12, 0, 0) }, { DRM_FORMAT_ARGB1555, "AR15", MAKE_RGB_INFO(5, 10, 5, 5, 5, 0, 1, 15) }, { DRM_FORMAT_XRGB1555, "XR15", MAKE_RGB_INFO(5, 10, 5, 5, 5, 0, 0, 0) }, + { DRM_FORMAT_ABGR1555, "AB15", MAKE_RGB_INFO(5, 0, 5, 5, 5, 10, 1, 15) }, + { DRM_FORMAT_XBGR1555, "XB15", MAKE_RGB_INFO(5, 0, 5, 5, 5, 10, 0, 0) }, + { DRM_FORMAT_RGBA5551, "RA15", MAKE_RGB_INFO(5, 11, 5, 6, 5, 1, 1, 0) }, + { DRM_FORMAT_RGBX5551, "RX15", MAKE_RGB_INFO(5, 11, 5, 6, 5, 1, 0, 0) }, + { DRM_FORMAT_BGRA5551, "BA15", MAKE_RGB_INFO(5, 1, 5, 6, 5, 11, 1, 0) }, + { DRM_FORMAT_BGRX5551, "BX15", MAKE_RGB_INFO(5, 1, 5, 6, 5, 11, 0, 0) }, { DRM_FORMAT_RGB565, "RG16", MAKE_RGB_INFO(5, 11, 6, 5, 5, 0, 0, 0) }, + { DRM_FORMAT_BGR565, "BG16", MAKE_RGB_INFO(5, 0, 6, 5, 5, 11, 0, 0) }, /* RGB24 */ { DRM_FORMAT_BGR888, "BG24", MAKE_RGB_INFO(8, 0, 8, 8, 8, 16, 0, 0) }, { DRM_FORMAT_RGB888, "RG24", MAKE_RGB_INFO(8, 16, 8, 8, 8, 0, 0, 0) }, /* RGB32 */ { DRM_FORMAT_ARGB8888, "AR24", MAKE_RGB_INFO(8, 16, 8, 8, 8, 0, 8, 24) }, - { DRM_FORMAT_BGRA8888, "BA24", MAKE_RGB_INFO(8, 8, 8, 16, 8, 24, 8, 0) }, { DRM_FORMAT_XRGB8888, "XR24", MAKE_RGB_INFO(8, 16, 8, 8, 8, 0, 0, 0) }, + { DRM_FORMAT_ABGR8888, "AB24", MAKE_RGB_INFO(8, 0, 8, 8, 8, 16, 8, 24) }, + { DRM_FORMAT_XBGR8888, "XB24", MAKE_RGB_INFO(8, 0, 8, 8, 8, 16, 0, 0) }, + { DRM_FORMAT_RGBA8888, "RA24", MAKE_RGB_INFO(8, 24, 8, 16, 8, 8, 8, 0) }, + { DRM_FORMAT_RGBX8888, "RX24", MAKE_RGB_INFO(8, 24, 8, 16, 8, 8, 0, 0) }, + { DRM_FORMAT_BGRA8888, "BA24", MAKE_RGB_INFO(8, 8, 8, 16, 8, 24, 8, 0) }, { DRM_FORMAT_BGRX8888, "BX24", MAKE_RGB_INFO(8, 8, 8, 16, 8, 24, 0, 0) }, + { DRM_FORMAT_ARGB2101010, "AR30", MAKE_RGB_INFO(10, 20, 10, 10, 10, 0, 2, 30) }, + { DRM_FORMAT_XRGB2101010, "XR30", MAKE_RGB_INFO(10, 20, 10, 10, 10, 0, 0, 0) }, + { DRM_FORMAT_ABGR2101010, "AB30", MAKE_RGB_INFO(10, 0, 10, 10, 10, 20, 2, 30) }, + { DRM_FORMAT_XBGR2101010, "XB30", MAKE_RGB_INFO(10, 0, 10, 10, 10, 20, 0, 0) }, + { DRM_FORMAT_RGBA1010102, "RA30", MAKE_RGB_INFO(10, 22, 10, 12, 10, 2, 2, 0) }, + { DRM_FORMAT_RGBX1010102, "RX30", MAKE_RGB_INFO(10, 22, 10, 12, 10, 2, 0, 0) }, + { DRM_FORMAT_BGRA1010102, "BA30", MAKE_RGB_INFO(10, 2, 10, 12, 10, 22, 2, 0) }, + { DRM_FORMAT_BGRX1010102, "BX30", MAKE_RGB_INFO(10, 2, 10, 12, 10, 22, 0, 0) }, }; unsigned int format_fourcc(const char *name) @@ -577,19 +604,47 @@ fill_smpte(const struct format_info *info, void *planes[3], unsigned int width, return fill_smpte_yuv_planar(&info->yuv, planes[0], planes[1], planes[2], width, height, stride); + case DRM_FORMAT_ARGB4444: + case DRM_FORMAT_XRGB4444: + case DRM_FORMAT_ABGR4444: + case DRM_FORMAT_XBGR4444: + case DRM_FORMAT_RGBA4444: + case DRM_FORMAT_RGBX4444: + case DRM_FORMAT_BGRA4444: + case DRM_FORMAT_BGRX4444: case DRM_FORMAT_RGB565: + case DRM_FORMAT_BGR565: case DRM_FORMAT_ARGB1555: case DRM_FORMAT_XRGB1555: + case DRM_FORMAT_ABGR1555: + case DRM_FORMAT_XBGR1555: + case DRM_FORMAT_RGBA5551: + case DRM_FORMAT_RGBX5551: + case DRM_FORMAT_BGRA5551: + case DRM_FORMAT_BGRX5551: return fill_smpte_rgb16(&info->rgb, planes[0], width, height, stride); + case DRM_FORMAT_BGR888: case DRM_FORMAT_RGB888: return fill_smpte_rgb24(&info->rgb, planes[0], width, height, stride); case DRM_FORMAT_ARGB8888: - case DRM_FORMAT_BGRA8888: case DRM_FORMAT_XRGB8888: + case DRM_FORMAT_ABGR8888: + case DRM_FORMAT_XBGR8888: + case DRM_FORMAT_RGBA8888: + case DRM_FORMAT_RGBX8888: + case DRM_FORMAT_BGRA8888: case DRM_FORMAT_BGRX8888: + case DRM_FORMAT_ARGB2101010: + case DRM_FORMAT_XRGB2101010: + case DRM_FORMAT_ABGR2101010: + case DRM_FORMAT_XBGR2101010: + case DRM_FORMAT_RGBA1010102: + case DRM_FORMAT_RGBX1010102: + case DRM_FORMAT_BGRA1010102: + case DRM_FORMAT_BGRX1010102: return fill_smpte_rgb32(&info->rgb, planes[0], width, height, stride); } @@ -807,19 +862,47 @@ fill_tiles(const struct format_info *info, void *planes[3], unsigned int width, return fill_tiles_yuv_planar(&info->yuv, planes[0], planes[1], planes[2], width, height, stride); + case DRM_FORMAT_ARGB4444: + case DRM_FORMAT_XRGB4444: + case DRM_FORMAT_ABGR4444: + case DRM_FORMAT_XBGR4444: + case DRM_FORMAT_RGBA4444: + case DRM_FORMAT_RGBX4444: + case DRM_FORMAT_BGRA4444: + case DRM_FORMAT_BGRX4444: case DRM_FORMAT_RGB565: + case DRM_FORMAT_BGR565: case DRM_FORMAT_ARGB1555: case DRM_FORMAT_XRGB1555: + case DRM_FORMAT_ABGR1555: + case DRM_FORMAT_XBGR1555: + case DRM_FORMAT_RGBA5551: + case DRM_FORMAT_RGBX5551: + case DRM_FORMAT_BGRA5551: + case DRM_FORMAT_BGRX5551: return fill_tiles_rgb16(&info->rgb, planes[0], width, height, stride); + case DRM_FORMAT_BGR888: case DRM_FORMAT_RGB888: return fill_tiles_rgb24(&info->rgb, planes[0], width, height, stride); case DRM_FORMAT_ARGB8888: - case DRM_FORMAT_BGRA8888: case DRM_FORMAT_XRGB8888: + case DRM_FORMAT_ABGR8888: + case DRM_FORMAT_XBGR8888: + case DRM_FORMAT_RGBA8888: + case DRM_FORMAT_RGBX8888: + case DRM_FORMAT_BGRA8888: case DRM_FORMAT_BGRX8888: + case DRM_FORMAT_ARGB2101010: + case DRM_FORMAT_XRGB2101010: + case DRM_FORMAT_ABGR2101010: + case DRM_FORMAT_XBGR2101010: + case DRM_FORMAT_RGBA1010102: + case DRM_FORMAT_RGBX1010102: + case DRM_FORMAT_BGRA1010102: + case DRM_FORMAT_BGRX1010102: return fill_tiles_rgb32(&info->rgb, planes[0], width, height, stride); } @@ -983,15 +1066,42 @@ create_test_buffer(struct kms_driver *kms, unsigned int format, planes[2] = virtual + offsets[2]; break; - case DRM_FORMAT_RGB565: + case DRM_FORMAT_ARGB4444: + case DRM_FORMAT_XRGB4444: + case DRM_FORMAT_ABGR4444: + case DRM_FORMAT_XBGR4444: + case DRM_FORMAT_RGBA4444: + case DRM_FORMAT_RGBX4444: + case DRM_FORMAT_BGRA4444: + case DRM_FORMAT_BGRX4444: case DRM_FORMAT_ARGB1555: case DRM_FORMAT_XRGB1555: + case DRM_FORMAT_ABGR1555: + case DRM_FORMAT_XBGR1555: + case DRM_FORMAT_RGBA5551: + case DRM_FORMAT_RGBX5551: + case DRM_FORMAT_BGRA5551: + case DRM_FORMAT_BGRX5551: + case DRM_FORMAT_RGB565: + case DRM_FORMAT_BGR565: case DRM_FORMAT_BGR888: case DRM_FORMAT_RGB888: case DRM_FORMAT_ARGB8888: - case DRM_FORMAT_BGRA8888: case DRM_FORMAT_XRGB8888: + case DRM_FORMAT_ABGR8888: + case DRM_FORMAT_XBGR8888: + case DRM_FORMAT_RGBA8888: + case DRM_FORMAT_RGBX8888: + case DRM_FORMAT_BGRA8888: case DRM_FORMAT_BGRX8888: + case DRM_FORMAT_ARGB2101010: + case DRM_FORMAT_XRGB2101010: + case DRM_FORMAT_ABGR2101010: + case DRM_FORMAT_XBGR2101010: + case DRM_FORMAT_RGBA1010102: + case DRM_FORMAT_RGBX1010102: + case DRM_FORMAT_BGRA1010102: + case DRM_FORMAT_BGRX1010102: offsets[0] = 0; kms_bo_get_prop(bo, KMS_HANDLE, &handles[0]); kms_bo_get_prop(bo, KMS_PITCH, &pitches[0]); commit c2988eb211ecad2db60081f1000cf19b350703db Author: Ville Syrjälä <ville.syrj...@linux.intel.com> Date: Wed Apr 17 19:18:02 2013 +0000 modetest: Fix pitches, somewhat libkms only has the xrgb8888 format, so we're overallocating the bo by quite a lot in some cases. But we still need to get the pitch from the libkms since it's the driver that decides how to align it. Signed-off-by: Ville Syrjälä <ville.syrj...@linux.intel.com> Acked-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com> diff --git a/tests/modetest/buffers.c b/tests/modetest/buffers.c index 5086381..00269e8 100644 --- a/tests/modetest/buffers.c +++ b/tests/modetest/buffers.c @@ -945,9 +945,9 @@ create_test_buffer(struct kms_driver *kms, unsigned int format, case DRM_FORMAT_VYUY: case DRM_FORMAT_YUYV: case DRM_FORMAT_YVYU: - pitches[0] = width * 2; offsets[0] = 0; kms_bo_get_prop(bo, KMS_HANDLE, &handles[0]); + kms_bo_get_prop(bo, KMS_PITCH, &pitches[0]); planes[0] = virtual; break; @@ -956,11 +956,11 @@ create_test_buffer(struct kms_driver *kms, unsigned int format, case DRM_FORMAT_NV21: case DRM_FORMAT_NV16: case DRM_FORMAT_NV61: - pitches[0] = width; offsets[0] = 0; kms_bo_get_prop(bo, KMS_HANDLE, &handles[0]); - pitches[1] = width; - offsets[1] = width * height; + kms_bo_get_prop(bo, KMS_PITCH, &pitches[0]); + pitches[1] = pitches[0]; + offsets[1] = pitches[0] * height; kms_bo_get_prop(bo, KMS_HANDLE, &handles[1]); planes[0] = virtual; @@ -968,14 +968,14 @@ create_test_buffer(struct kms_driver *kms, unsigned int format, break; case DRM_FORMAT_YVU420: - pitches[0] = width; offsets[0] = 0; kms_bo_get_prop(bo, KMS_HANDLE, &handles[0]); - pitches[1] = width / 2; - offsets[1] = width * height; + kms_bo_get_prop(bo, KMS_PITCH, &pitches[0]); + pitches[1] = pitches[0] / 2; + offsets[1] = pitches[0] * height; kms_bo_get_prop(bo, KMS_HANDLE, &handles[1]); - pitches[2] = width / 2; - offsets[2] = offsets[1] + (width * height) / 4; + pitches[2] = pitches[1]; + offsets[2] = offsets[1] + pitches[1] * height / 2; kms_bo_get_prop(bo, KMS_HANDLE, &handles[2]); planes[0] = virtual; @@ -986,29 +986,15 @@ create_test_buffer(struct kms_driver *kms, unsigned int format, case DRM_FORMAT_RGB565: case DRM_FORMAT_ARGB1555: case DRM_FORMAT_XRGB1555: - pitches[0] = width * 2; - offsets[0] = 0; - kms_bo_get_prop(bo, KMS_HANDLE, &handles[0]); - - planes[0] = virtual; - break; - case DRM_FORMAT_BGR888: case DRM_FORMAT_RGB888: - pitches[0] = width * 3; - offsets[0] = 0; - kms_bo_get_prop(bo, KMS_HANDLE, &handles[0]); - - planes[0] = virtual; - break; - case DRM_FORMAT_ARGB8888: case DRM_FORMAT_BGRA8888: case DRM_FORMAT_XRGB8888: case DRM_FORMAT_BGRX8888: - pitches[0] = width * 4; offsets[0] = 0; kms_bo_get_prop(bo, KMS_HANDLE, &handles[0]); + kms_bo_get_prop(bo, KMS_PITCH, &pitches[0]); planes[0] = virtual; break; commit aa4afdf0b3be20aa6037b64f90983ea0146b2893 Author: Laurent Pinchart <laurent.pinch...@ideasonboard.com> Date: Thu Nov 1 09:38:42 2012 +0000 kms: Return a negative error code in kms_bo_create() The function returns returns 0 on success or a negative value in case of an error, except when given invalid attributes in which case it returns the positive EINVAL value. Replace that with -EINVAL to allow the caller to detect errors with a < 0 check. Signed-off-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com> Reviewed-by: Jakob Bornecrantz <wallbra...@gmail.com> diff --git a/libkms/api.c b/libkms/api.c index 4a05f3d..5befaa0 100644 --- a/libkms/api.c +++ b/libkms/api.c @@ -80,7 +80,7 @@ int kms_bo_create(struct kms_driver *kms, const unsigned *attr, struct kms_bo ** type = value; break; default: - return EINVAL; + return -EINVAL; } } commit 9fa4a4b1a894fa8fffe2075bc3376b7fa5e18104 Author: Laurent Pinchart <laurent.pinch...@ideasonboard.com> Date: Thu Nov 1 09:40:30 2012 +0000 kms: Make libkms.h usable in C++ Wrap the header in extern "C" { ... };. Signed-off-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com> Reviewed-by: Jakob Bornecrantz <wallbra...@gmail.com> diff --git a/libkms/libkms.h b/libkms/libkms.h index 4664442..c00b159 100644 --- a/libkms/libkms.h +++ b/libkms/libkms.h @@ -29,6 +29,10 @@ #ifndef _LIBKMS_H_ #define _LIBKMS_H_ +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + /** * \file * @@ -71,4 +75,8 @@ int kms_bo_map(struct kms_bo *bo, void **out); int kms_bo_unmap(struct kms_bo *bo); int kms_bo_destroy(struct kms_bo **bo); +#if defined(__cplusplus) || defined(c_plusplus) +}; +#endif + #endif commit e5d8a9c1d6375feb74feb52f419a025f1abf94d1 Author: Rob Clark <robdcl...@gmail.com> Date: Fri Apr 12 11:28:13 2013 -0400 freedreno: add shifted reloc Needed for RB_COPY_DEST_BASE register on a3xx. Signed-off-by: Rob Clark <robdcl...@gmail.com> diff --git a/freedreno/freedreno_ringbuffer.c b/freedreno/freedreno_ringbuffer.c index 822412a..f187996 100644 --- a/freedreno/freedreno_ringbuffer.c +++ b/freedreno/freedreno_ringbuffer.c @@ -203,6 +203,18 @@ void fd_ringbuffer_emit_reloc(struct fd_ringbuffer *ring, fd_pipe_add_submit(ring->pipe, bo); } +void fd_ringbuffer_emit_reloc_shift(struct fd_ringbuffer *ring, + struct fd_bo *bo, uint32_t offset, uint32_t or, int32_t shift) +{ + uint32_t addr = fd_bo_gpuaddr(bo, offset); + if (shift < 0) + addr >>= -shift; + else + addr <<= shift; + (*ring->cur++) = addr | or; + fd_pipe_add_submit(ring->pipe, bo); +} + void fd_ringbuffer_emit_reloc_ring(struct fd_ringbuffer *ring, struct fd_ringmarker *target) { diff --git a/freedreno/freedreno_ringbuffer.h b/freedreno/freedreno_ringbuffer.h index 4fb668f..051bbca 100644 --- a/freedreno/freedreno_ringbuffer.h +++ b/freedreno/freedreno_ringbuffer.h @@ -74,6 +74,8 @@ static inline void fd_ringbuffer_emit(struct fd_ringbuffer *ring, void fd_ringbuffer_emit_reloc(struct fd_ringbuffer *ring, struct fd_bo *bo, uint32_t offset, uint32_t or); +void fd_ringbuffer_emit_reloc_shift(struct fd_ringbuffer *ring, + struct fd_bo *bo, uint32_t offset, uint32_t or, int32_t shift); void fd_ringbuffer_emit_reloc_ring(struct fd_ringbuffer *ring, struct fd_ringmarker *target); commit a36cdb858e21f287d7b51ded2f211f1c84bda90b Author: Jerome Glisse <jgli...@redhat.com> Date: Mon Apr 8 13:35:37 2013 -0400 radeon: add si tiling support v5 v2: Only writte tile index if flags for it is set v3: Remove useless allow2d scanout flags v4: Split radeon_drm.h update to its own patch v5: update against lastest next tree for radeon Signed-off-by: Jerome Glisse <jgli...@redhat.com> Reviewed-by: Michel Dänzer <michel.daen...@amd.com> diff --git a/radeon/radeon_surface.c b/radeon/radeon_surface.c index 5935c23..288b5e2 100644 --- a/radeon/radeon_surface.c +++ b/radeon/radeon_surface.c @@ -83,12 +83,14 @@ typedef int (*hw_best_surface_t)(struct radeon_surface_manager *surf_man, struct radeon_hw_info { /* apply to r6, eg */ - uint32_t group_bytes; - uint32_t num_banks; - uint32_t num_pipes; + uint32_t group_bytes; + uint32_t num_banks; + uint32_t num_pipes; /* apply to eg */ - uint32_t row_size; - unsigned allow_2d; + uint32_t row_size; + unsigned allow_2d; + /* apply to si */ + uint32_t tile_mode_array[32]; }; struct radeon_surface_manager { @@ -1000,12 +1002,403 @@ static int eg_surface_best(struct radeon_surface_manager *surf_man, /* =========================================================================== * Southern Islands family */ +#define SI__GB_TILE_MODE__PIPE_CONFIG(x) (((x) >> 6) & 0x1f) +#define SI__PIPE_CONFIG__ADDR_SURF_P2 0 +#define SI__PIPE_CONFIG__ADDR_SURF_P4_8x16 4 +#define SI__PIPE_CONFIG__ADDR_SURF_P4_16x16 5 -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1uy9ek-00024h...@vasks.debian.org