Re: [PATCH][RFC] time: add wait_interruptible_timeout macro to sleep (w. timeout) until wake_up
W dniu 26 lutego 2010 20:01 użytkownik Ville Syrjälä syrj...@sci.fi napisał: Disabling the condition check doesn't make sense. You could use a completion. init_completion(vbl_irq); enable_vbl_irq(); wait_for_completion(vbl_irq); disable_vbl_irq(); and call complete(vbl_irq) in the interrupt handler. The same would of course work with just some flag or counter and a wait queue. Ouch, I can see it gone bad already. Firstly I simply just wanted to avoid condition in wait_event_*. It looked unnecessary as I got interrupts (signals). So I started playing with other solutions (like my wait_interruptible_timeout where I had not full understanding of waking up) and finally started analyzing over-complex things like completions. I'll just use some one more variable and some more basic solution. Thanks for help and sorry for taking your time. I hope to provide at least some of you dynamic radeon PM in return :) -- Rafał -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 26334] Thinkpad T400: AMD Mobility Radeon HD 3470 + 2 monitors
http://bugs.freedesktop.org/show_bug.cgi?id=26334 Kirill A. Shutemov kir...@shutemov.name changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Comment #12 from Kirill A. Shutemov kir...@shutemov.name 2010-02-27 02:24:45 PST --- Thanks! Updated DRM (I've tested drm-next) helps. -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 26334] Thinkpad T400: AMD Mobility Radeon HD 3470 + 2 monitors
http://bugs.freedesktop.org/show_bug.cgi?id=26334 Kirill A. Shutemov kir...@shutemov.name changed: What|Removed |Added Status|RESOLVED|VERIFIED -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: [PATCH 1/2] drm/radeon/kms: rename gpu_reset to asic_reset V2
On Fri, Feb 26, 2010 at 10:33:34PM +0100, Jerome Glisse wrote: Patch rename gpu_reset to asic_reset in prevision of having gpu_reset doing more stuff than just basic asic reset. V2 store the last time we had new fence in the fence driver so on EBUSY/ERESTART we still keep accurate timing information on how long we have been waiting for a given fence Signed-off-by: Jerome Glisse jgli...@redhat.com Ignore this patch i messed up my git history sight. Jerome -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 26195] Green screen on HDMI with RV730
http://bugs.freedesktop.org/show_bug.cgi?id=26195 --- Comment #13 from Michael Lothian m...@fireburn.co.uk 2010-02-27 06:38:21 PST --- Created an attachment (id=33623) -- (http://bugs.freedesktop.org/attachment.cgi?id=33623) With Patch1 -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 26195] Green screen on HDMI with RV730
http://bugs.freedesktop.org/show_bug.cgi?id=26195 --- Comment #14 from Michael Lothian m...@fireburn.co.uk 2010-02-27 06:38:57 PST --- Created an attachment (id=33624) -- (http://bugs.freedesktop.org/attachment.cgi?id=33624) With Patch1 and 2 There was no green screen with either patch -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[PATCH 5/6] tests: Add nouveau to list of supported modules.
--- tests/kmstest/main.c |1 + tests/modetest/modetest.c |2 +- 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/tests/kmstest/main.c b/tests/kmstest/main.c index 7aaeb75..5df0a38 100644 --- a/tests/kmstest/main.c +++ b/tests/kmstest/main.c @@ -59,6 +59,7 @@ int test_bo(struct kms_driver *kms) char *drivers[] = { i915, radeon, + nouveau, vmwgfx, NULL }; diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c index 041b9dd..3ca9d06 100644 --- a/tests/modetest/modetest.c +++ b/tests/modetest/modetest.c @@ -680,7 +680,7 @@ int main(int argc, char **argv) int c; int encoders = 0, connectors = 0, crtcs = 0, framebuffers = 0; int test_vsync = 0; - char *modules[] = { i915, radeon }; + char *modules[] = { i915, radeon, nouveau }; char *modeset = NULL; int i, count = 0; struct connector con_args[2]; -- 1.6.4.4 -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[PATCH 3/6] libkms: Add nouveau support.
--- libkms/Makefile.am |4 + libkms/internal.h |2 + libkms/linux.c |4 + libkms/nouveau.c | 221 4 files changed, 231 insertions(+), 0 deletions(-) create mode 100644 libkms/nouveau.c diff --git a/libkms/Makefile.am b/libkms/Makefile.am index e84deb1..0375ae4 100644 --- a/libkms/Makefile.am +++ b/libkms/Makefile.am @@ -21,6 +21,10 @@ if HAVE_VMWGFX libkms_la_SOURCES += vmwgfx.c endif +if HAVE_NOUVEAU +libkms_la_SOURCES += nouveau.c +endif + libkmsincludedir = ${includedir}/libkms libkmsinclude_HEADERS = libkms.h diff --git a/libkms/internal.h b/libkms/internal.h index 9d1c5f7..63122d1 100644 --- a/libkms/internal.h +++ b/libkms/internal.h @@ -68,4 +68,6 @@ int vmwgfx_create(int fd, struct kms_driver **out); int intel_create(int fd, struct kms_driver **out); +int nouveau_create(int fd, struct kms_driver **out); + #endif diff --git a/libkms/linux.c b/libkms/linux.c index 94e1b52..02182d3 100644 --- a/libkms/linux.c +++ b/libkms/linux.c @@ -107,6 +107,10 @@ linux_from_sysfs(int fd, struct kms_driver **out) else if (!strcmp(name, vmwgfx)) ret = vmwgfx_create(fd, out); #endif +#ifdef HAVE_NOUVEAU + else if (!strcmp(name, nouveau)) + ret = nouveau_create(fd, out); +#endif else ret = -ENOSYS; diff --git a/libkms/nouveau.c b/libkms/nouveau.c new file mode 100644 index 000..44d7116 --- /dev/null +++ b/libkms/nouveau.c @@ -0,0 +1,221 @@ +/** + * + * Copyright © 2009 VMware, Inc., Palo Alto, CA., USA + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * Software), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + * USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **/ + + +#define HAVE_STDINT_H +#define _FILE_OFFSET_BITS 64 + +#include errno.h +#include stdio.h +#include stdlib.h +#include string.h +#include internal.h + +#include sys/mman.h +#include sys/ioctl.h +#include xf86drm.h + +#include nouveau_drm.h + +struct nouveau_bo +{ + struct kms_bo base; + uint64_t map_handle; + unsigned map_count; +}; + +static int +nouveau_get_prop(struct kms_driver *kms, unsigned key, unsigned *out) +{ + switch (key) { + case KMS_BO_TYPE: + *out = KMS_BO_TYPE_SCANOUT | KMS_BO_TYPE_CURSOR_64X64_ARGB; + break; + default: + return -EINVAL; + } + return 0; +} + +static int +nouveau_destroy(struct kms_driver *kms) +{ + free(kms); + return 0; +} + +static int +nouveau_bo_create(struct kms_driver *kms, +const unsigned width, const unsigned height, +const enum kms_bo_type type, const unsigned *attr, +struct kms_bo **out) +{ + struct drm_nouveau_gem_new arg; + unsigned size, pitch; + struct nouveau_bo *bo; + int i, ret; + + for (i = 0; attr[i]; i += 2) { + switch (attr[i]) { + case KMS_WIDTH: + case KMS_HEIGHT: + case KMS_BO_TYPE: + break; + default: + return -EINVAL; + } + } + + bo = calloc(1, sizeof(*bo)); + if (!bo) + return -ENOMEM; + + if (type == KMS_BO_TYPE_CURSOR_64X64_ARGB) { + pitch = 64 * 4; + size = 64 * 64 * 4; + } else if (type == KMS_BO_TYPE_SCANOUT) { + pitch = width * 4; + pitch = (pitch + 512 - 1) ~(512 - 1); + size = pitch * height; + } else { + return -EINVAL; + } + + memset(arg, 0, sizeof(arg)); + arg.info.size = size; + arg.info.domain = NOUVEAU_GEM_DOMAIN_MAPPABLE | NOUVEAU_GEM_DOMAIN_VRAM; + arg.info.tile_mode = 0; + arg.info.tile_flags = 0; +
[PATCH 1/6] Add config.h macro HAVE_NOUVEAU
--- configure.ac |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index ef7700f..40634c5 100644 --- a/configure.ac +++ b/configure.ac @@ -154,6 +154,9 @@ if test x$VMWGFX = xyes; then fi AM_CONDITIONAL(HAVE_NOUVEAU, [test x$NOUVEAU = xyes]) +if test x$NOUVEAU = xyes; then + AC_DEFINE(HAVE_NOUVEAU, 1, [Have nouveau (nvidia) support]) +fi AM_CONDITIONAL(HAVE_RADEON, [test x$RADEON = xyes]) -- 1.6.4.4 -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[PATCH 2/6] libkms/intel: Throw out unused intel_bo fields.
--- libkms/intel.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/libkms/intel.c b/libkms/intel.c index a1914f8..8b8249b 100644 --- a/libkms/intel.c +++ b/libkms/intel.c @@ -44,9 +44,7 @@ struct intel_bo { struct kms_bo base; - unsigned handle; unsigned map_count; - int mapped; }; static int -- 1.6.4.4 -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[PATCH 4/6] tests/modetest: Don't get_props on a connector after freeing it.
--- tests/modetest/modetest.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c index 26405f4..041b9dd 100644 --- a/tests/modetest/modetest.c +++ b/tests/modetest/modetest.c @@ -206,10 +206,10 @@ void dump_connectors(void) for (j = 0; j connector-count_modes; j++) dump_mode(connector-modes[j]); - drmModeFreeConnector(connector); - printf( props:\n); dump_props(connector); + + drmModeFreeConnector(connector); } printf(\n); } -- 1.6.4.4 -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[PATCH 6/6] modes: vrefresh is actually not * 1000.
--- tests/modeprint/modeprint.c |4 ++-- tests/modetest/modetest.c |4 ++-- xf86drmMode.h |2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/modeprint/modeprint.c b/tests/modeprint/modeprint.c index 8971914..4c612f4 100644 --- a/tests/modeprint/modeprint.c +++ b/tests/modeprint/modeprint.c @@ -81,8 +81,8 @@ int printMode(struct drm_mode_modeinfo *mode) printf(\tvrefresh: %i\n, mode-vrefresh); printf(\tflags : %i\n, mode-flags); } else { - printf(Mode: \%s\ %ix%i %.0f\n, mode-name, - mode-hdisplay, mode-vdisplay, mode-vrefresh / 1000.0); + printf(Mode: \%s\ %ix%i %i\n, mode-name, + mode-hdisplay, mode-vdisplay, mode-vrefresh); } return 0; } diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c index 3ca9d06..c12699c 100644 --- a/tests/modetest/modetest.c +++ b/tests/modetest/modetest.c @@ -143,9 +143,9 @@ void dump_encoders(void) void dump_mode(drmModeModeInfo *mode) { - printf( %s %.02f %d %d %d %d %d %d %d %d\n, + printf( %s %d %d %d %d %d %d %d %d %d\n, mode-name, - (float)mode-vrefresh / 1000, + mode-vrefresh, mode-hdisplay, mode-hsync_start, mode-hsync_end, diff --git a/xf86drmMode.h b/xf86drmMode.h index 44d90ed..ee7c454 100644 --- a/xf86drmMode.h +++ b/xf86drmMode.h @@ -181,7 +181,7 @@ typedef struct _drmModeModeInfo { uint16_t hdisplay, hsync_start, hsync_end, htotal, hskew; uint16_t vdisplay, vsync_start, vsync_end, vtotal, vscan; - uint32_t vrefresh; /* vertical refresh * 1000 */ + uint32_t vrefresh; uint32_t flags; uint32_t type; -- 1.6.4.4 -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[PATCH 3/6] libkms: Add nouveau support.
--- This is a corrected version, the previous one was missing some fixes.. libkms/Makefile.am |4 + libkms/internal.h |2 + libkms/linux.c |4 + libkms/nouveau.c | 220 4 files changed, 230 insertions(+), 0 deletions(-) create mode 100644 libkms/nouveau.c diff --git a/libkms/Makefile.am b/libkms/Makefile.am index e84deb1..0375ae4 100644 --- a/libkms/Makefile.am +++ b/libkms/Makefile.am @@ -21,6 +21,10 @@ if HAVE_VMWGFX libkms_la_SOURCES += vmwgfx.c endif +if HAVE_NOUVEAU +libkms_la_SOURCES += nouveau.c +endif + libkmsincludedir = ${includedir}/libkms libkmsinclude_HEADERS = libkms.h diff --git a/libkms/internal.h b/libkms/internal.h index 9d1c5f7..63122d1 100644 --- a/libkms/internal.h +++ b/libkms/internal.h @@ -68,4 +68,6 @@ int vmwgfx_create(int fd, struct kms_driver **out); int intel_create(int fd, struct kms_driver **out); +int nouveau_create(int fd, struct kms_driver **out); + #endif diff --git a/libkms/linux.c b/libkms/linux.c index 94e1b52..02182d3 100644 --- a/libkms/linux.c +++ b/libkms/linux.c @@ -107,6 +107,10 @@ linux_from_sysfs(int fd, struct kms_driver **out) else if (!strcmp(name, vmwgfx)) ret = vmwgfx_create(fd, out); #endif +#ifdef HAVE_NOUVEAU + else if (!strcmp(name, nouveau)) + ret = nouveau_create(fd, out); +#endif else ret = -ENOSYS; diff --git a/libkms/nouveau.c b/libkms/nouveau.c new file mode 100644 index 000..0e24a15 --- /dev/null +++ b/libkms/nouveau.c @@ -0,0 +1,220 @@ +/** + * + * Copyright © 2009 VMware, Inc., Palo Alto, CA., USA + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * Software), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + * USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **/ + + +#define HAVE_STDINT_H +#define _FILE_OFFSET_BITS 64 + +#include errno.h +#include stdio.h +#include stdlib.h +#include string.h +#include internal.h + +#include sys/mman.h +#include sys/ioctl.h +#include xf86drm.h + +#include nouveau_drm.h + +struct nouveau_bo +{ + struct kms_bo base; + uint64_t map_handle; + unsigned map_count; +}; + +static int +nouveau_get_prop(struct kms_driver *kms, unsigned key, unsigned *out) +{ + switch (key) { + case KMS_BO_TYPE: + *out = KMS_BO_TYPE_SCANOUT_X8R8G8B8 | KMS_BO_TYPE_CURSOR_64X64_A8R8G8B8; + break; + default: + return -EINVAL; + } + return 0; +} + +static int +nouveau_destroy(struct kms_driver *kms) +{ + free(kms); + return 0; +} + +static int +nouveau_bo_create(struct kms_driver *kms, +const unsigned width, const unsigned height, +const enum kms_bo_type type, const unsigned *attr, +struct kms_bo **out) +{ + struct drm_nouveau_gem_new arg; + unsigned size, pitch; + struct nouveau_bo *bo; + int i, ret; + + for (i = 0; attr[i]; i += 2) { + switch (attr[i]) { + case KMS_WIDTH: + case KMS_HEIGHT: + case KMS_BO_TYPE: + break; + default: + return -EINVAL; + } + } + + bo = calloc(1, sizeof(*bo)); + if (!bo) + return -ENOMEM; + + if (type == KMS_BO_TYPE_CURSOR_64X64_A8R8G8B8) { + pitch = 64 * 4; + size = 64 * 64 * 4; + } else if (type == KMS_BO_TYPE_SCANOUT_X8R8G8B8) { + pitch = width * 4; + pitch = (pitch + 512 - 1) ~(512 - 1); + size = pitch * height; + } else { + return -EINVAL; + } + + memset(arg, 0, sizeof(arg)); + arg.info.size = size; + arg.info.domain =
[Bug 15112] Radeon KMS on RV250 gets wrong refresh rate.
http://bugzilla.kernel.org/show_bug.cgi?id=15112 Joe Kowalski joekowal...@gmail.com changed: What|Removed |Added Kernel Version|2.6.33-rc5 |2.6.33 --- Comment #11 from Joe Kowalski joekowal...@gmail.com 2010-02-27 16:14:55 --- This problem is still present in 2.6.33 final. -- Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are watching the assignee of the bug. -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[PATCH 1/3] libdrm_intel.pc: don't include ${includedir}/drm
intel_bufmgr.h is installed in ${includedir} directly, and the other headers are taken care of by libdrm.pc's Cflags. Signed-off-by: Julien Cristau jcris...@debian.org --- intel/libdrm_intel.pc.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/intel/libdrm_intel.pc.in b/intel/libdrm_intel.pc.in index b93f1c6..e8080d9 100644 --- a/intel/libdrm_intel.pc.in +++ b/intel/libdrm_intel.pc.in @@ -8,4 +8,4 @@ Description: Userspace interface to kernel DRM services Version: @PACKAGE_VERSION@ Requires: libdrm Libs: -L${libdir} -ldrm_intel -Cflags: -I${includedir} -I${includedir}/drm +Cflags: -I${includedir} -- 1.6.6.1 -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: [PATCH 2/3] libdrm_nouveau requires libdrm
On Fri, Feb 26, 2010 at 13:38:59 -0500, Kristian Høgsberg wrote: On Fri, Feb 26, 2010 at 1:07 PM, Julien Cristau jcris...@debian.org wrote: nouveau_drmif.h includes xf86drm.h. If it's a source level dependency it should be a regular Requires: in the .pc. Requires.private: is only for private libraries you link to but don't expose their API in your header files. The idea is (AFAIK) that you can ask pkg-config to list all libraries to link to for static linking, in which case pkg-config needs a way to find all needed libraries. It even looks like Requires.private has been obsoleted by Libs.private in recent pkg-config. That's not what the pkg-config maintainer says... http://err.no/personal/blog/2008/Mar/25 Using Requires.private lets us get the necessary cflags, but avoids linking to the library if not using --static. Cheers, Julien -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[PATCH] DRM: fix headers_check warnings
Fixed following headers_check warnings: CHECK include/drm (14 files) include/drm/drm_mode.h:84: found __[us]{8,16,32,64} type without #include linux/types.h include/drm/i915_drm.h:119: found __[us]{8,16,32,64} type without #include linux/types.h include/drm/mga_drm.h:260: found __[us]{8,16,32,64} type without #include linux/types.h include/drm/radeon_drm.h:758: found __[us]{8,16,32,64} type without #include linux/types.h include/drm/via_drm.h:117: found __[us]{8,16,32,64} type without #include linux/types.h Signed-off-by: Jaswinder Singh Rajput jaswinderraj...@gmail.com Cc: Kristian Høgsberg k...@bitplanet.net Cc: Arnd Bergmann a...@arndb.de Cc: Dave Airlie airl...@redhat.com --- include/drm/drm_mode.h |2 ++ include/drm/i915_drm.h |1 + include/drm/mga_drm.h|1 + include/drm/radeon_drm.h |1 + include/drm/via_drm.h|1 + 5 files changed, 6 insertions(+), 0 deletions(-) diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h index c5ba163..c5aa66d 100644 --- a/include/drm/drm_mode.h +++ b/include/drm/drm_mode.h @@ -27,6 +27,8 @@ #ifndef _DRM_MODE_H #define _DRM_MODE_H +#include linux/types.h + #define DRM_DISPLAY_INFO_LEN 32 #define DRM_CONNECTOR_NAME_LEN 32 #define DRM_DISPLAY_MODE_LEN 32 diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h index b64a8d7..5cf7f5b 100644 --- a/include/drm/i915_drm.h +++ b/include/drm/i915_drm.h @@ -27,6 +27,7 @@ #ifndef _I915_DRM_H_ #define _I915_DRM_H_ +#include linux/types.h #include drm.h /* Please note that modifications to all structs defined here are diff --git a/include/drm/mga_drm.h b/include/drm/mga_drm.h index 3ffbc47..ae23df9 100644 --- a/include/drm/mga_drm.h +++ b/include/drm/mga_drm.h @@ -35,6 +35,7 @@ #ifndef __MGA_DRM_H__ #define __MGA_DRM_H__ +#include linux/types.h #include drm.h /* WARNING: If you change any of these defines, make sure to change the diff --git a/include/drm/radeon_drm.h b/include/drm/radeon_drm.h index 39537f3..459ff45 100644 --- a/include/drm/radeon_drm.h +++ b/include/drm/radeon_drm.h @@ -33,6 +33,7 @@ #ifndef __RADEON_DRM_H__ #define __RADEON_DRM_H__ +#include linux/types.h #include drm.h /* WARNING: If you change any of these defines, make sure to change the diff --git a/include/drm/via_drm.h b/include/drm/via_drm.h index fd11a5b..23880b0 100644 --- a/include/drm/via_drm.h +++ b/include/drm/via_drm.h @@ -24,6 +24,7 @@ #ifndef _VIA_DRM_H_ #define _VIA_DRM_H_ +#include linux/types.h #include drm.h /* WARNING: These defines must be the same as what the Xserver uses. -- 1.6.6 -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: [PATCH 3/6] libkms: Add nouveau support.
Hi Marcin, I have some minor comments inlined below. Best regards, Erik +static int +nouveau_bo_create(struct kms_driver *kms, + const unsigned width, const unsigned height, + const enum kms_bo_type type, const unsigned *attr, + struct kms_bo **out) +{ + struct drm_nouveau_gem_new arg; + unsigned size, pitch; + struct nouveau_bo *bo; + int i, ret; + + for (i = 0; attr[i]; i += 2) { + switch (attr[i]) { + case KMS_WIDTH: + case KMS_HEIGHT: + case KMS_BO_TYPE: + break; + default: + return -EINVAL; + } + } + + bo = calloc(1, sizeof(*bo)); + if (!bo) + return -ENOMEM; + + if (type == KMS_BO_TYPE_CURSOR_64X64_ARGB) { + pitch = 64 * 4; + size = 64 * 64 * 4; + } else if (type == KMS_BO_TYPE_SCANOUT) { + pitch = width * 4; + pitch = (pitch + 512 - 1) ~(512 - 1); What is 512 derived from? Would a #define explain this better? + size = pitch * height; + } else { + return -EINVAL; + } + + memset(arg, 0, sizeof(arg)); + arg.info.size = size; + arg.info.domain = NOUVEAU_GEM_DOMAIN_MAPPABLE | NOUVEAU_GEM_DOMAIN_VRAM; + arg.info.tile_mode = 0; + arg.info.tile_flags = 0; + arg.align = 512; + arg.channel_hint = 0; + + ret = drmCommandWriteRead(kms-fd, DRM_NOUVEAU_GEM_NEW, arg, sizeof(arg)); + if (ret) + goto err_free; + + bo-base.kms = kms; + bo-base.handle = arg.info.handle; + bo-base.size = size; + bo-base.pitch = pitch; + bo-map_handle = arg.info.map_handle; + + *out = bo-base; + + return 0; + +err_free: + free(bo); + return ret; +} + +static int +nouveau_bo_get_prop(struct kms_bo *bo, unsigned key, unsigned *out) +{ + switch (key) { + default: + return -EINVAL; + } +} + +static int +nouveau_bo_map(struct kms_bo *_bo, void **out) +{ + struct nouveau_bo *bo = (struct nouveau_bo *)_bo; + void *map = NULL; + int ret; + ret is unused. + if (bo-base.ptr) { + bo-map_count++; + *out = bo-base.ptr; + return 0; + } + + map = mmap(0, bo-base.size, PROT_READ | PROT_WRITE, MAP_SHARED, bo-base.kms-fd, bo-map_handle); + if (map == MAP_FAILED) + return -errno; + + bo-base.ptr = map; + bo-map_count++; + *out = bo-base.ptr; + + return 0; +} + +static int +nouveau_bo_unmap(struct kms_bo *_bo) +{ + struct nouveau_bo *bo = (struct nouveau_bo *)_bo; + bo-map_count--; + return 0; +} + +static int +nouveau_bo_destroy(struct kms_bo *_bo) +{ + struct nouveau_bo *bo = (struct nouveau_bo *)_bo; + struct drm_gem_close arg; + int ret; + + if (bo-base.ptr) { + /* XXX Sanity check map_count */ + munmap(bo-base.ptr, bo-base.size); + bo-base.ptr = NULL; + } + + memset(arg, 0, sizeof(arg)); + arg.handle = bo-base.handle; + + ret = drmIoctl(bo-base.kms-fd, DRM_IOCTL_GEM_CLOSE, arg); + if (ret) + return -errno; + + free(bo); + return 0; +} + +int +nouveau_create(int fd, struct kms_driver **out) +{ + struct kms_driver *kms; + + kms = calloc(1, sizeof(*kms)); + if (!kms) + return -ENOMEM; + + kms-fd = fd; + + kms-bo_create = nouveau_bo_create; + kms-bo_map = nouveau_bo_map; + kms-bo_unmap = nouveau_bo_unmap; + kms-bo_get_prop = nouveau_bo_get_prop; + kms-bo_destroy = nouveau_bo_destroy; +// kms-get_prop = nouveau_get_prop; + kms-destroy = nouveau_destroy; + *out = kms; + + return 0; +} -- 1.6.4.4 -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev --
[Bug 25662] R300: System locks up when running any graphical program using KMS
http://bugs.freedesktop.org/show_bug.cgi?id=25662 a.ra...@arcor.de changed: What|Removed |Added CC||a.ra...@arcor.de --- Comment #5 from a.ra...@arcor.de 2010-02-27 14:16:27 PST --- I have a very similar behavior in ArchLinux. I can login using lxdm. Once Xfce is started it either freezes almost immediately or after a few seconds when I have opened a terminal or anything else. I'm not sure if this is a different issue or the same. Behavior looks similar and it's the same chipset family I think. We had used KMS already for a while in kernel 2.6.31 where it worked well. It started to freeze later, first noticed in 2.6.33rc1. I have no interesting entries in dmesg or Xorg.log. How can I provide more information to track this down? (using kernel 2.6.33, libdrm 2.4.18, mesa 7.7 and ddx from todays git master) (--) PCI:*(0:1:5:0) 1002:5a62:144d:c02b ATI Technologies Inc RC410 [Radeon Xpress 200M] rev 0, Mem @ 0xd000/268435456, 0xc000/65536, I/O @ 0x9000/256, BIOS @ 0x/131072 -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel