summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/intel
Commit message (Collapse)AuthorAgeFilesLines
* Android: move libdrm settings to top-level Android.common.mkRob Herring2016-06-131-1/+1
| | | | | | | | | | | | | | Fix warnings like these due to HAVE_LIBDRM being inconsistently defined: external/libdrm/include/drm/drm.h:839:30: warning: redefinition of typedef 'drm_clip_rect_t' is a C11 feature [-Wtypedef-redefinition] typedef struct drm_clip_rect drm_clip_rect_t; HAVE_LIBDRM needs to be set project wide to fix this. This change also harmlessly links libdrm with everything, but simplifies the makefiles a bit. Signed-off-by: Rob Herring <robh@kernel.org> Acked-by: Emil Velikov <emil.velikov@collabora.com>
* gallium: push offset down to driverStanimir Varbanov2016-05-301-0/+5
| | | | | | | | | | | | | Push offset down to drivers when importing dmabuf. This is needed to more fully support EGL_EXT_image_dma_buf_import when a non-zero offset is specified. Tesing has been done for freedreno, and compile tested following gallium drivers: nouveau,svga,virgl,r600,r300,radeonsi,swrast,i915,ilo Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* ilo: move intel_winsys.h to coreChia-I Wu2015-05-021-1/+1
| | | | | Add a new subdirectory and start moving files that do not depend on ilo_screen/ilo_context to it.
* android: use LOCAL_SHARED_LIBRARIES over TARGET_OUT_HEADERSEmil Velikov2015-04-221-2/+1
| | | | | | | | | ... to manage the LIBDRM*_CFLAGS. The former is the recommended approach by the Android build system developers while the latter has been depreciated for quite some time. Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* ilo: add more convenient intel_bo_{ref,unref}()Chia-I Wu2015-03-061-5/+9
| | | | | They both check for NULL and intel_bo_ref() returns the referenced bo. They replace intel_bo_{reference,unreference}().
* ilo: add intel_bo_set_tiling()Chia-I Wu2015-03-061-39/+33
| | | | | Make intel_winsys_alloc_bo() always allocate a linear bo, and add intel_bo_set_tiling() to set the tiling. Document the purpose of tiling.
* ilo: add some more winsys functionsChia-I Wu2015-03-041-1/+37
| | | | | | Add intel_winsys_get_reset_stats(), intel_winsys_import_userptr(), and intel_bo_map_async(). The latter two are stubs, but we are not going to use them immediately either.
* gallium: Remove Android files from distribution.Matt Turner2014-12-121-2/+0
| | | | Android builds Mesa from git, so there don't need to be in the tarball.
* ilo: fix intel_bo_wait() on kernel 3.17Chia-I Wu2014-11-061-1/+7
| | | | | | drm_intel_gem_bo_wait() with negative timeout is broken on kernel 3.17. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
* winsys/intel: drop intel_winsys.h from makefile.sourcesEmil Velikov2014-09-051-2/+1
| | | | | | | | | | | With the last revisions of commit 664c2d76947(gallium/ilo: cleanup intel_winsys.h) we moved the header from winsys to drivers, but we forgot to update the makefile.sources to reflect this. Cc: Chia-I Wu <olvaffe@gmail.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com> Acked-by: Matt Turner <mattst88@gmail.com>
* winsys/$(hw): ship the Android/SCons scripts in the tarballEmil Velikov2014-08-281-0/+2
| | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* winsys/$(hw): include headers in Makefile.sourcesEmil Velikov2014-08-281-1/+3
| | | | | | Otherwise 'make dist' will not pick them up :'( Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* gallium/ilo: cleanup intel_winsys.hEmil Velikov2014-08-284-315/+11
| | | | | | | | | | | | | | | | Make the header location, inclusion and contents more common with its i915,r* and nouveau counterparts: - Move the header within drivers/ilo. - Separate out intel_winsys_create_for_fd into 'drm_public' header. - Cleanup the compiler includes. v2: Move the header to drivers/ilo. Suggested by Chia-I. v3: Correct intel_winsys.h inclusion. Spotted by Chia-I. Cc: Chia-I Wu <olvaffe@gmail.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
* ilo: rename intel_bo_map_unsynchronized()Chia-I Wu2014-08-262-4/+3
| | | | Rename it to intel_bo_map_gtt_async().
* ilo: remove max_batch_sizeChia-I Wu2014-08-262-6/+3
| | | | | It is used to derive an artificial limit on max relocs per bo. We choose not to export it anymore.
* ilo: replace domains by reloc flagsChia-I Wu2014-08-262-32/+43
| | | | | It is simpler and is supported by the kernel. It cannot be used with libdrm_intel yet though.
* ilo: fold drm_intel_get_aperture_sizes() within probe_winsys()Emil Velikov2014-08-192-13/+10
| | | | | | | | | ... and store the value in intel_winsys_info/ilo_dev_info. Suggested-by: Chia-I Wu <olvaffe@gmail.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> olv: check for errors and report raw values
* gallium/ilo: handle query_renderer capsEmil Velikov2014-08-152-0/+13
| | | | | | | | | | | Implementation based on the classic driver with the following changes: - Use auxiliarry function os_get_total_physical_memory to get the total amount of memory. - Move the libdrm_intel specific get_aperture_size to the winsys. Cc: Chia-I Wu <olvaffe@gmail.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* android: gallium: use the installed libdrm headersEmil Velikov2014-08-131-4/+1
| | | | | | Saves us a few lines and brings us closer to the automake build. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* ilo: move away from drm_intel_bo_alloc_tiledChia-I Wu2014-07-152-54/+59
| | | | | We want to know the exact sizes of the BOs, and the driver has the knowledge to do so. Refactoring of the resource allocation code is needed though.
* ilo: destroy the mutex, if winsys creation failsEmil Velikov2014-05-101-0/+1
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
* ilo: do not set I915_EXEC_NO_RELOCChia-I Wu2014-03-101-11/+1
| | | | | | | This reverts most of commit d80f0c34b733a874adfdd3a2267e4deec345cc6b. Upon a closer reading, having the presumed offsets written is not enough to set the flag. EXEC_OBJECT_NEEDS_GTT and/or EXEC_OBJECT_WRITE of the reloc entries must also be set appropriately.
* ilo: print a warning when PPGTT is disabledChia-I Wu2014-03-102-0/+4
| | | | | Despite what the PRMs say, the driver appears to work fine when PPGTT is disabled. But at least print a warning in that case.
* ilo: require hardware logical context supportChia-I Wu2014-03-102-2/+20
| | | | The code paths are not tested for a while, and have some known issues.
* ilo: protect the decode context with a mutexChia-I Wu2014-03-101-7/+20
| | | | The decode context is not thread safe.
* ilo: set I915_EXEC_NO_RELOC when availableChia-I Wu2014-03-102-3/+15
| | | | | The winsys makes it clear that the pipe drivers should write presumed offsets. We can always set I915_EXEC_NO_RELOC when the kernel supports it.
* ilo: move ring types to winsysChia-I Wu2014-03-102-15/+19
| | | | | It results in less code despite that i915_drm.h specifies the ring type as part of the execution flags.
* ilo: winsys may limit the batch buffer sizeChia-I Wu2014-03-102-0/+3
| | | | | | The maximum batch buffer size is determined at the time of drm_intel_bufmgr_gem_init(). Make sure the pipe driver does not exceed the limit.
* ilo: PIPE_CAP_QUERY_TIMESTAMP may not be supportedChia-I Wu2014-03-102-0/+15
| | | | Reading TIMESTAMP register may fail, depending on both kernel and hardware.
* ilo: rework winsys batch buffer functionsChia-I Wu2014-03-102-38/+47
| | | | | | | | | | | Rename intel_winsys_check_aperture_size() to intel_winsys_can_submit_bo(), intel_bo_exec() to intel_winsys_submit_bo(), and intel_winsys_decode_commands() to intel_winsys_decode_bo(). Make a semantic change to ignore intel_context when the ring is not the render ring.
* ilo: replace bo alloc flags by initial domainsChia-I Wu2014-03-102-13/+12
| | | | | | The only alloc flag is INTEL_ALLOC_FOR_RENDER, which can as well be expressed by specifying the initial write domain. The change makes it obvious that we failed to set INTEL_ALLOC_FOR_RENDER in several places.
* ilo: remove intel_bo_get_size()Chia-I Wu2014-03-102-13/+0
| | | | | | Commit bfa8d21759c5f2b5b0885c696842167bd4c64fee uses it to work around a hardware limitation. But there are other ways to do it without the need for intel_bo_get_size().
* ilo: remove intel_bo_get_virtual()Chia-I Wu2014-03-102-24/+36
| | | | Make the map functions return the pointer directly.
* ilo: rework winsys bo reloc functionsChia-I Wu2014-03-102-26/+22
| | | | | | | | | | | | | Rename intel_bo_emit_reloc() to intel_bo_add_reloc(), intel_bo_clear_relocs() to intel_bo_truncate_relocs(), and intel_bo_references() to intel_bo_has_reloc(). Besides, we need intel_bo_get_offset() only to get the presumed offset afer adding a reloc entry. Remove the function and make intel_bo_add_reloc() return the presumed offset. While at it, switch to gem_bo->offset64 from gem_bo->offset.
* ilo: add a wrapper to cast struct intel_boChia-I Wu2014-03-101-23/+28
| | | | It is just drm_intel_bo, but having a wrapper makes the code cleaner.
* ilo: fix DRM_API_HANDLE_TYPE_FD exportChia-I Wu2014-03-101-2/+0
| | | | | It can be exported by drm_intel_bo_gem_export_to_prime(). The code is already in winsys, just not enabled.
* ilo: improve winsys documentation/commentsChia-I Wu2014-03-102-15/+107
| | | | | Document the interface, and add comments as to why some features are enabled and why some checks are made.
* ilo: remove intel_winsys_enable_reuse()Chia-I Wu2014-03-102-11/+3
| | | | It should be an (winsys) implementation detail.
* ilo: Support DRI Image 7Christopher James Halse Rogers2013-12-101-2/+0
| | | | | | Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
* gallium/winsys: compact compiler flags into Automake.incEmil Velikov2013-11-161-3/+2
| | | | | | | | | | | | | | | | Cleanup the duplicating flags and consolidate into a sigle variable. Note: this patch adds VISIBILITY_CFLAGS to the following targets * freedreno/drm * i915/{drm,sw} * nouveau/drm * sw/fbdev * sw/null * sw/wayland * sw/wrapper * sw/xlib Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* winsys/intel: build with VISIBILITY_CFLAGSChia-I Wu2013-07-111-1/+2
| | | | There is no public symbol in this winsys.
* winsys/intel: fix typo in "ETIMEOUT"Jean-Sébastien Pédron2013-06-261-1/+1
| | | | | | | | Should be "ETIMEDOUT". [olv: commit message slightly re-formatted] Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
* winsys/intel: make struct intel_bo alias drm_intel_boChia-I Wu2013-06-121-122/+50
| | | | | | | | There is really nothing in struct intel_bo, and having it alias drm_intel_bo makes the winsys impose almost zero overhead. We can make the overhead gone completely by making the functions static inline, if needed.
* winsys/intel: reorganize functionsChia-I Wu2013-06-121-249/+249
| | | | Move functions around to match the order of the declarations in the header.
* ilo: update winsys interfaceChia-I Wu2013-06-122-56/+52
| | | | | | The motivation is to kill tiling and pitch in struct intel_bo. That requires us to make tiling and pitch not queryable, and be passed around as function parameters.
* ilo: get rid of function tables in winsysChia-I Wu2013-06-124-560/+464
| | | | | We are moving toward making struct intel_bo alias drm_intel_bo. As a first step, we cannot have function tables.
* winsys/intel: test for and expose address swizzlingChia-I Wu2013-05-162-0/+23
| | | | | Without knowing whether addresses are swizzled or not, we cannot manipulate a tiled surface in CPU.
* android: add ilo to the build systemChia-I Wu2013-05-061-0/+40
| | | | | | | | | It can be selected with BOARD_GPU_DRIVERS := ilo Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
* winsys/intel: new winsys for intelChia-I Wu2013-04-265-0/+946
This is a wrapper for libdrm_intel to allow the pipe driver to stay OS agnostic.