summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* egl/wayland: Emit EGL_BAD_PARAMETER for eglCreatePlatformPixmapSurfaceChad Versace2014-03-171-1/+17
| | | | | | | | | | From the EGL_EXT_wayland_spec, version 3: It is not valid to call eglCreatePlatformPixmapSurfaceEXT with a <dpy> that belongs to Wayland. Any such call fails and generates EGL_BAD_PARAMETER. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl/gbm: Emit EGL_BAD_PARAMETER for eglCreatePlatformPixmapSurfaceChad Versace2014-03-171-1/+16
| | | | | | | | | | From the EGL_MESA_platform_gbm spec, version 5: It is not valid to call eglCreatePlatformPixmapSurfaceEXT with a <dpy> that belongs to the GBM platform. Any such call fails and generates EGL_BAD_PARAMETER. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl/main: Stop using EGLNative types internallyChad Versace2014-03-1712-46/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Internally, much of the EGL code uses EGLNativeDisplayType, EGLNativeWindowType, and EGLPixmapType. However, the EGLNative type often does not match the variable's actual type. The concept of EGLNative types are a bad match for Linux, as explained below. And the EGL platform extensions don't use EGLNative types at all. Those extensions attempt to solve cross-platform issues by moving the EGL API away from the EGLNative types. The core of the problem is that eglplatform.h can define each EGLNative type once only, but Linux supports multiple EGL platforms. To work around the problem, Mesa's eglplatform.h contains multiple definitions of each EGLNative type, selected by feature macros. Mesa expects EGL clients to set the feature macro approrpiately. But the feature macros don't work when a single codebase must be built with support for multiple EGL platforms, *such as Mesa itself*. When building libEGL, autotools chooses the EGLNative typedefs based on the first element of '--with-egl-platforms'. For example, '--with-egl-platforms=x11,drm,wayland' defines the following: typedef Display* EGLNativeDisplayType; typedef Window EGLNativeWindowType; typedef Pixmap EGLNativePixmapType; Clearly, this doesn't work well for Wayland and GBM. Mesa works around the problem by casting the EGLNative types to different things in different files. For sanity's sake, and to prepare for the EGL platform extensions, this patch removes from egl/main and egl/dri2 all internal use of the EGLNative types. It replaces them with 'void*' and checks each explicit cast with a static assertion. Also, the patch touches egl_gallium the minimal amount to keep it compatible with eglapi.h. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl: Add STATIC_ASSERT() macroChad Versace2014-03-171-0/+5
| | | | Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl/dri2: Dispatch eglCreateImageKHR by display, not driverChad Versace2014-03-176-18/+35
| | | | | | | | | | | | Add dri2_egl_display_vtbl::create_image, set it for each platform, and let egl_dri2 dispatch eglCreateImageKHR to that. To remove ambiguity, rename egl_dri2.c:dri2_create_image() to dri2_create_image_from_dri(). This prepares for the EGL platform extensions. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl/dri2/x11: Don't clobber _EGLDriver::APIChad Versace2014-03-171-5/+0
| | | | | | | | | | | dri2_initialize_x11_swrast() does a strange thing. For some extensions it doesn't support, it sets the corresponding functions in _EGLDriver::API to NULL. The intention here is clear, but misplaced. NULL or not, the function pointers never get called because their extensions aren't supported. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl/dri2: Dispatch eglCreateWaylandBufferFromImageWL by display, not driverChad Versace2014-03-177-6/+32
| | | | | | | | | | Add dri2_egl_display_vtbl::create_wayland_buffer_from_image, set it for each platform, and let egl_dri2 dispatch eglCreateWaylandBufferFromImageWL to that. This prepares for the EGL platform extensions. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl/dri2: Consolidate eglTerminateChad Versace2014-03-172-40/+24
| | | | | | | | | | | | | | | | | | | | egl_dri2.c:dri2_terminate() handled terminating X11 and DRM displays. The Wayland platform implemented its own dri2_wl_terminate(), which was nearly a copy of the common one. To implement the EGL platform extensions, we either need to dispatch eglTerminate per display or define a common implementation for all platforms. This patch chooses consolidation. It removes dri2_wl_terminate() by folding it into the common dri2_terminate(). It was necessary to invert the `if (disp->PlatformDisplay == NULL)` and the switch statement because, unlike DRM and X11, Wayland's terminator performed action even when EGL didn't own the native display. In the inversion, I replaced `disp->PlatformDisplay == NULL` with `dri2_dpy->own_device` because the two expressions are synonymous, but the latter's meaning is clearer. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl/dri2/x11: Set dri2_dpy->own_deviceChad Versace2014-03-171-0/+3
| | | | | | | | When the user calls eglGetDisplay(EGL_DEFAULT_DISPLAY), the Wayland and DRM platforms set dri2_dpy->own_device=true. This patch makes the X11 platform do the same for consistency. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl/dri2: Dispatch eglPostSubBufferNV by display, not driverChad Versace2014-03-177-1/+27
| | | | | | | | | | Add dri2_egl_display_vtbl::post_sub_buffer, set it for each platform, and let egl_dri2 dispatch eglPostSubBufferNV to that. This prepares for the EGL platform extensions. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl/dri2: Dispatch eglSwapBuffersRegionNOK by display, not driverChad Versace2014-03-177-2/+26
| | | | | | | | | | Add dri2_egl_display_vtbl::swap_buffers_region, set it for each platform, and let egl_dri2 dispatch eglSwapBuffersRegionNOK to that. This prepares for the EGL platform extensions. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl/dri2: Dispatch eglCopyBuffers by display, not driverChad Versace2014-03-177-3/+25
| | | | | | | | | | Add dri2_egl_display_vtbl::copy_buffers, set it for each platform, and let egl_dri2 dispatch eglCopyBuffers to that. This prepares for the EGL platform extensions. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl/dri2: Dispatch API.QueryBufferAge by display, not driverChad Versace2014-03-177-5/+26
| | | | | | | | | | Add dri2_egl_display_vtbl::query_buffer_age, set it for each platform, and let egl_dri2 dispatch API.QueryBufferAge to that. This prepares for the EGL platform extensions. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl/dri2: Dispatch eglDestroySurface by display, not driverChad Versace2014-03-176-6/+16
| | | | | | | | | | Add dri2_egl_display_vtbl::destroy_surface, set it for each platform, and let egl_dri2 dispatch eglDestroySurface to that. This prepares for the EGL platform extensions. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl/dri2: Dispatch eglCreatePbufferSurface by display, not driverChad Versace2014-03-177-3/+26
| | | | | | | | | | Add dri2_egl_display_vtbl::create_pbuffer_surface, set it for each platform, and let egl_dri2 dispatch eglCreatePbufferSurface to that. This prepares for the EGL platform extensions. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl/dri2: Dispatch eglCreatePixmapSurface by display, not driverChad Versace2014-03-177-11/+30
| | | | | | | | | | Add dri2_egl_display_vtbl::create_pbuffer_surface, set it for each platform, and let egl_dri2 dispatch eglCreatePixmapSurface to that. This prepares for the EGL platform extensions. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl/dri2: Dispatch eglCreateWindowSurface by display, not driverChad Versace2014-03-176-5/+21
| | | | | | | | | | Add dri2_egl_display_vtbl::create_window_surface, set it for each platform, and let egl_dri2 dispatch eglCreateWindowSurface to that. This prepares for the EGL platform extensions. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl/dri2: Dispatch eglSwapBuffersWithDamage by display, not driverChad Versace2014-03-177-1/+27
| | | | | | | | | | Add dri2_egl_display_vtbl::swap_buffers_with_damage, set it for each platform, and let egl_dri2 dispatch eglSwapBuffersWithDamageEXT to that. This prepares for the EGL platform extensions. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl/dri2: Dispatch eglSwapBuffers by display, not driverChad Versace2014-03-176-5/+16
| | | | | | | | | | Add dri2_egl_display_vtbl::swap_buffers, set it for each platform, and let egl_dri2 dispatch eglSwapBuffers to that. This prepares for the EGL platform extensions. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl/dri2: Dispatch eglSwapInterval by display, not driverChad Versace2014-03-177-2/+55
| | | | | | | | | | Add dri2_egl_display_vtbl::swap_interval, set it for each platform, and let egl_dri2 dispatch eglSwapInterval to that. This prepares for the EGL platform extensions. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl/wl,x11: Call dri2_swap_interval() staticallyChad Versace2014-03-172-2/+10
| | | | | | | | | | Don't call it through the driver dispatch table. Just call it statically. This prepares for the EGL platform extensions. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl/dri2: Put platform func names into proper namespacesChad Versace2014-03-173-170/+177
| | | | | | | | | | | | | | | | | | | | Each of the egl_dri2 platforms (except Android) prefix their function names with "dri2", not "dri2_${platform}". This means many function names have three separate definitions in the egl_dri2 directory: one in each of platform_drm.c, platform_wayland.c, and platform_x11.c. For example, each of the three files defines dri2_create_window_surface(). The name collisions make it difficult to review patches for correctness ("Is this patch hunk calling a platform_x11 function or a global egl_dri2 function?"), complicate debugging, and confuse code navigation tools. For each function in platform_x11.c prefixed with 'dri2', this patch changes its prefix to 'dri2_x11'. Likewise for platform_drm.c and 'dri2_drm'; and platform_wayland.c and 'dri2_wl'. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl/dri2: Move dri2_egl_display virtual funcs to vtblChad Versace2014-03-176-7/+52
| | | | | | | | | | | dri2_egl_display has only one virtual function, 'authenticate'. Define dri2_egl_display::vtbl and move 'authenticate' there. This prepares for the EGL platform extensions, which will add many more virtual functions to dri2_egl_display. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl: Update to revision 24567 of eglext.hChad Versace2014-03-171-443/+517
| | | | | | | | | | | This pulls in EGL_EXT_platform_base, EGL_EXT_platform_wayland, EGL_EXT_platform_x11, and EGL_MESA_platform_gbm. This patch has a lot of churn because Khronos recently changed its method of generating headers. Khronos now generates it headers from XML. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* winsys/radeon: Store GPU virtual memory addresses of BOs in a hash tableMichel Dänzer2014-03-171-48/+26
| | | | | | | | | | | | | This allows retrieving the existing BO and incrementing its reference count, instead of creating a separate winsys representation for it, when the kernel reports that the BO was already assigned a virtual memory address. This fixes problems with XWayland using radeonsi and the xf86-video-wlglamor driver, which calls GEM flink outside of the radeon winsys code and creates BOs from the flinked names using the same DRM file descriptor. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* targets/dri-ilo: make the driver installableChia-I Wu2014-03-161-4/+3
| | | | | | | | | | | | | | install-gallium-links.mk fails to create the compat link for ilo_dri.so because it looks for dri_LTLIBRARIES instead of noinst_LTLIBRARIES. Fix this by switching to dri_LTLIBRARIES (and make the driver installable). Since pci_id_driver_map.h and the DDX both tell libGL.so to look for "i965", ilo_dri.so will never be loaded even enabled and installed. The change should not create any more confusion. Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Acked-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* mesa: mark GL_RGB9_E5 as not color-renderableMarek Olšák2014-03-151-4/+0
| | | | | | | | | | | | The GL 4.4 spec says it's not color-renderable and not accepted by RenderBufferStorage. The EXT_texture_shared_exponent spec says it's not color-renderable but it's accepted by RenderBufferStorageEXT. This seems to be a bug in the extension spec. Let's do what GL 4.4 says. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* radeonsi/compute: Fix memory leakAaron Watry2014-03-151-0/+6
| | | | | | Free shader buffer object for all kernels when deleting compute state. Signed-off-by: Aaron Watry <awatry@gmail.com>
* st/mesa: remove _NEW_POLYGON dependency from vertex shaderMarek Olšák2014-03-153-11/+12
| | | | | | We can just check the polygon mode when updating the edge flag state. Also, we can just flag ST_NEW_VERTEX_PROGRAM directly, which makes ST_NEW_EDGEFLAGS_DATA useless.
* st/mesa: implement zero-stride edge flag by culling primitivesMarek Olšák2014-03-153-1/+17
| | | | This was unimplemented.
* st/mesa: fix per-vertex edge flags and GLSL support (v2)Marek Olšák2014-03-152-7/+6
| | | | | | | | This fixes piglit/gl-2.0-edgeflag. v2: use StrideB to recognize per-vertex edge flags Cc: mesa-stable@lists.freedesktop.org
* i965/fs: Invalidate live intervals when demoting uniforms to pull params.Kenneth Graunke2014-03-141-0/+2
| | | | | | | | | | | | | | Normally, nothing uses live intervals at this point, so this isn't necessary. However, dump_instructions() calculates them and uses them to show register pressure. So, calling dump_instructions() in this area of the code would segfault due to the arrays being the wrong size. This is not a candidate for stable branches because it only serves to fix internal debugging code that you manually have to invoke by altering the source code or using gdb. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com>
* i965/fs: Print "+reladdr" on variably-indexed uniform arrays.Kenneth Graunke2014-03-141-2/+5
| | | | | | | | | | | | Previously, dump_instruction() would print output such as: { 2} 3: mov vgrf1:F, u0:F { 3} 4: mov vgrf7:F, u0:F { 4} 5: mov vgrf8:F, u0:F which looked like either a scalar access or perhaps a constant-indexed access of element 0, when it was really a variable index. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com>
* i965: Fix register types in dump_instructions(), again.Kenneth Graunke2014-03-144-4/+3
| | | | | | | | | | | | In commit e57d77280efcbfd6579a88f071426653287ef833, I fixed this for destinations in the Vec4 backend, and sources in the scalar backend. But not both types in both backends. To prevent this mess from continuing, make the reg_encoding table static, so only the disassembler can use it. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com>
* i965/fs: Fix register comparisons in saturate propagation.Kenneth Graunke2014-03-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | opt_saturate_propagation_local compares scan_inst->dst.reg/reg_offset with inst->src[0].reg/reg_offset, and ensures that scan_inst->dst.file is GRF. But nothing ensured that inst->src[0].file was GRF. In the following program, this resulted in u1:F matching vgrf1:UW, and a saturate being incorrectly propagated from instruction 8 to instruction 1. { 1} 0: add vgrf0:UW, hw_reg1+8:UW, hw_reg0:V { 1} 1: add vgrf1:UW, hw_reg1+10:UW, hw_reg0:V { 1} 2: linterp vgrf6:F, hw_reg2:F, hw_reg3:F, hw_reg0:F { 2} 3: linterp vgrf27:F, hw_reg2:F, hw_reg3:F, hw_reg0+16:F { 4} 4: mov vgrf10+0.0:F, vgrf6:F { 3} 5: mov vgrf10+1.0:F, vgrf27:F { 6} 6: tex vgrf8+0.0:F, vgrf10+0.0:F { 5} 7: mov vgrf32:F, u1:F { 5} 8: mov.sat vgrf12:F, u1:F From shader-db: total instructions in shared programs: 1841932 -> 1841957 (0.00%) instructions in affected programs: 5823 -> 5848 (0.43%) I inspected two of the 25 hurt shaders, and concluded that they were both hitting this bug, and not legitimately optimized. This fixes bugs in Left 4 Dead 2 and Team Fortress 2, possibly among others. The optimization pass didn't exist in 10.0, so this is only a candidate for 10.1. Cc: "10.1" <mesa-stable@lists.freedesktop.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
* glsl: Improve debug output and variable names for opt_dead_code_local.Eric Anholt2014-03-141-13/+13
| | | | | | | I know this code has confused others, and it confused me 3 years later, too. Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* i965: Add support for GL_ARB_buffer_storage.Eric Anholt2014-03-143-3/+9
| | | | | | | | | | | | It turns out we can allow COHERENT storage/mappings all the time, regardless of LLC vs non-LLC. It just means never using temporary mappings to avoid GPU stalls, and on non-LLC we have to use the GTT intead of CPU mappings. If we were to use CPU maps on non-LLC (which might be useful if apps end up using buffer_storage on PBO reads, to avoid WC read slowness), those would be PERSISTENT but not COHERENT, but doing that would require us driving the clflushes from userspace somehow. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* i965: Always use CPU mappings for BOs on LLC platforms.Eric Anholt2014-03-141-1/+1
| | | | | | | | It looks like there's no big difference for write-only workloads, but using a CPU map means that if they happen to read without having set the MAP_READ_BIT, they get 100x the performance for those reads. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* i965: Drop the system-memory temporary allocations for flush explicit.Eric Anholt2014-03-142-52/+58
| | | | | | | While in expected usage patterns nobody will ever hit this path, doubling our bandwidth used seems like a waste, and it cost us extra code too. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* i965: Switch mapping modes for non-explicit-flush blit-temporary maps.Eric Anholt2014-03-141-3/+3
| | | | | | | | | On LLC, it should always be better to use a cached mapping than the GTT. On non-LLC, it seems pretty silly to try to optimize read performance for the INVALIDATE_RANGE_BIT case. This will make the buffer_storage logic easier. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* gallivm: optimize repeat linear npot code in the aos int pathJeff Muizelaar2014-03-141-12/+62
| | | | | | Similar to the other cases, shift some weight/coord calculations to int space. This should be slightly faster (on x86 sse it should actually safe one instruction, and generally int instructions are cheaper).
* gallivm: use correct rounding for nearest wrap mode (in the aos int path)Roland Scheidegger2014-03-141-29/+9
| | | | | | | | | | | | | The previous code used coords which were calculated as (int) (f_coord * tex_size * 256) >> 8. This is not only unnecessarily complex but can give the wrong texel due to rounding for negative coords (as an example, after denormalization coords from -1.0 to 0.0 should give -1, but this will give -1 for numbers from -1.0-1/256 - 0.0-1/256. Instead, juse use ifloor, dropping the shift stuff. Unfortunately, this will most likely be slower - with arch rounding available it shouldn't be too bad (trades a int shift for a round but also saves an int mul (which is shared by all coords) but otherwise it's a mess.
* gallivm: use correct rounding for linear wrap mode (in the aos int path)Jeff Muizelaar2014-03-141-6/+8
| | | | | | | | | | | | | | | | | | | The previous method for converting coords to ints was sligthly inaccurate (effectively losing 1bit from the 8bit lerp weight). This is probably especially noticeable when trying to draw a pixel-aligned texture. As an example, for a 100x100 texture after dernormalization the texture coords in this case would turn up as 0.5, 1.5, 2.5, 3.5, 4.5, ... After the mul by 256, conversion to int and 128 subtraction, they end up as 0, 256, 512, 768, 1024, ... which gets us the correct coords/weights of 0/0, 1/0, 2/0, 3/0, 4/0, ... But even LSB errors (which are unavoidable) in the input coords may cause these coords/weights to be wrong, e.g. for a coord of 3.49999 we'd get a coord/weight of 2/255 instead. Fix this by using round-to-nearest int instead of FPToSi (trunc). Should be equally fast on x86 sse though other archs probably suffer a little.
* glapi: restore _glthread_GetID() functionBrian Paul2014-03-142-0/+15
| | | | | | | This partially reverts patch 02cb04c68f. This fixes an unresolved symbol error when using older builds of libGL. Tested-by: Chia-I Wu <olv@lunarg.com>
* radeonsi: flush the dma ring in si_flush_from_stNiels Ole Salscheider2014-03-141-0/+7
| | | | | Signed-off-by: Niels Ole Salscheider <niels_ole@salscheider-online.de> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
* radeon: Move DMA ring creation to common codeNiels Ole Salscheider2014-03-144-31/+32
| | | | | Signed-off-by: Niels Ole Salscheider <niels_ole@salscheider-online.de> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
* mesa: return v.value_int64 when the requested type is TYPE_INT64Emil Velikov2014-03-141-3/+3
| | | | | | | | Fixes "Operands don't affect result" defect reported by Coverity. Cc: "9.2 10.0 10.1" <mesa-stable@lists.freedesktop.org> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* nvc0: minor cleanups in stream output handlingEmil Velikov2014-03-141-4/+5
| | | | | | | | | | Constify the offsets parameter to silence gcc warning 'assignment from incompatible pointer type' due to function prototype miss-match. Use a boolean changed as a shorthand for target != current_target. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* nouveau: honor fread return value in the nouveau_compilerEmil Velikov2014-03-141-2/+2
| | | | | | | | | | There is little point of continuing if fread returns zero, as it indicates that either the file is empty or cannot be read from. Bail out if fread returns zero after closing the file. Cc: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* nouveau: typecast the prime_fd handle when calling nouveau_bo_set_primeEmil Velikov2014-03-141-1/+1
| | | | | | | | Core drm defines that the handle is of type int, while all drivers treat it as uint internally. Typecast the value to silence gcc warning messages and be consistent amongst all drivers. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>