summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-08-26Add support to permit mapping memory with protection infoHEADmasterRussell King
The standard galcore user memory mapping function fails when asked to map read-only memory, such as X shmem buffers. The reason these fail is because get_user_pages() is always attempted with "write" mode enabled, which is not permissible with read-only mappings. To allow this to work (so that Xv can be implemented efficiently) we must be able to map read-only buffers. This adds an extension to etnaviv, found in my Dove galcore driver and Jon Nettleton's iMX6 kernels which permit this without changing the existing galcore APIs. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2014-08-26Add support to import dmabuf fds into etnavivRussell King
dmabufs are DMA buffers which can be passed between kernel drivers under the control of userspace by means of a file descriptor. Add support to import dmabufs into etnaviv, creating an etna_bo for them which can be released using the normal methods. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2014-08-26Fix viv_map_user_memory() for 4.6.9 iMX GCABIRussell King
The 4.6.9 iMX GCABI has a .physical member added to the MapUserMemory structure, which must be initialised to ~0 to map by virtual address. Introduce a new conditional "GCABI_MAPUSERMEMORY_HAS_PHYSICAL" to indicate the presence of this member and arrange to initialise it appropriately in viv_map_user_memory(). Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2014-08-26GCABI for 4.6.9 iMX galcoreJon Nettleton
Add header files and etnaviv configuration for the 4.6.9 iMX galcore version, found in (at least) Jon Nettleton's 3.14.14 kernel. Signed-off-by: Jon Nettleton <jon.nettleton@gmail.com> Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2014-08-26Properly handle ioctl() returning EINTRRussell King
Jon Nettleton's kernel galcore driver can return EINTR while waiting for user signals. With this galcore version, if we are waiting on a command buffer galcore signal (to indicate that the buffer is now available for re-use), and we are sent a user signal (eg, SIGALRM), then ioctl() may return EINTR. This causes etnaviv to believe that the galcore signal was received, and it is safe to proceed with the next command buffer. In reality, this can cause the GPU to scribble over memory which it should not, and can cause the entire platform to lock up. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2014-08-26Add viv_ioctl() interfaceRussell King
Add a viv_ioctl() interface to provide an etnaviv version of gcoOS_DeviceControl(). This allows us to temporarily extend galcore with features that it otherwise would not have (such as my DMA buf import, and support for user memory mapping of regions marked read-only.) Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2014-08-26Ensure that the signals are properly destroyed in enta_free()Russell King
etna_create() allocates six signals, one for the context and one per allocated command buffer. etna_free() cleans up the command buffers, but fails to clean up the signals which etna_create() allocated. Fix this oversight. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2014-08-07Fix vbo format issue in etna_screen_is_format_supportedWladimir J. van der Laan
I don't know if this will have any effect but the check was clearly the wrong way around. Thanks to imirkin on IRC for noticing this.
2014-08-05Ensure top level makefile serialises sub-makesRussell King
We must ensure that the subdirectories are built in the correct order, otherwise the link fails. Disable parallel make in the top level makefile, so that only the lower level makefiles benefit from parallel make. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2014-08-05Ensure make -n works at the top levelRussell King
It is not very friendly for make -n to fail. Fix this. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2014-08-05Improve logging of command buffersRussell King
Rather than printing command buffers as one word per line, print 8 words per line. This allows a more condensed view of the command stream. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2014-08-05Direct debugging output via stderr not stdoutRussell King
Avoid writing to stdout; depending on the program using etnaviv, stdout may not be the console, and, in the case of programs such as Xorg, may not be something which should receive any output. As the C library uses stderr internally for assert(), it is reasonable to expect that this will be suitable for debug output. Therefore, direct etnaviv debugging output to stderr. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2014-08-05Avoid leaking context buffers in etna_free()Russell King
Testing on Dove reveals that the context buffers are leaked each time Etnaviv is closed down. This is caused by the ifdef which surrounds the call to enta_bo_del() always being false, and so the code to free this buffer is never compiled. Fix the ifdef, and also fix the code so that it builds. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2014-08-01Add cleaned v4 driver from GCW treeWladimir J. van der Laan
Much easier to read than the others.
2014-07-22Correct typo in docWladimir J. van der Laan
2014-05-15Merge pull request #28 from tchebb/masterWladimir J. van der Laan
Fix fbdemos segmentation fault when using single-buffered fbdev devices
2014-04-27fbdemos: fix segfault when operating single-bufferedThomas Hebb
2014-04-22Merge pull request #27 from austriancoder/masterWladimir J. van der Laan
add bitfield descriptions for CHIP_IDENTITY
2014-04-21add bitfield descriptions for CHIP_IDENTITYChristian Gmeiner
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2014-03-30Merge remote-tracking branch 'olpc/master'Wladimir J. van der Laan
2014-03-09build: add -pthread to default compiler and linker flagsWladimir J. van der Laan
Suggested by @kneo and @stefan-langenmaier at about the same time.
2014-03-03driver: fix rendering to texture levels>0 on pre-GC2000Wladimir J. van der Laan
Revert behavior in case of one pixel pipe.
2014-03-02fbdemos: align height to RS requirementsWladimir J. van der Laan
When detiling, the RS requires dimensions for the window size that are a multiple of 4. With two pixel pipes this amounts to 8. Hence pad the height of the output buffers to the next multiple of 8.
2014-02-22Merge pull request #24 from austriancoder/masterWladimir J. van der Laan
mesatest_gles fixes
2014-02-21fix compile warningsChristian Gmeiner
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2014-02-21driver: do not upgrade textures (sampler views) to MULTI tiledChristian Gmeiner
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2014-02-11Merge pull request #23 from austriancoder/masterWladimir J. van der Laan
GC2000 works
2014-02-11rs: fix pipe_offset[1] to fix all rendering issuesChristian Gmeiner
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2014-02-08Merge pull request #21 from austriancoder/masterWladimir J. van der Laan
some gc2000 related stuff
2014-02-08driver: make use of calculated addresses for PE/TS DEPTH_ADDRChristian Gmeiner
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2014-02-08driver: use calulated address for TS_COLOR_SURFACE_BASEChristian Gmeiner
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2014-02-08pe: make us of calculated addressesChristian Gmeiner
With this commit the PE pipe addresses and the RS pipe addresses are the same --> on a GC2000 the image is combined correctly. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2014-02-08driver: make use of calculated addressesChristian Gmeiner
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2014-02-08driver: store calculated pipe addresses in struct etna_resourceChristian Gmeiner
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2014-02-08rs: change struct rs_state to contain all pipe addressesChristian Gmeiner
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2014-02-08rs: add some debug outputChristian Gmeiner
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2014-02-08driver: add support for multi tiled formatsChristian Gmeiner
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2014-02-08rs: make use of xxx_tiling to determine multi pipe usageChristian Gmeiner
We can detect via source and dest tiling if we need to use multi pipes. So we can get rid of the extra tow mutli variables in rs_state. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2014-02-08rs: only emit pipe addresses which are really usedChristian Gmeiner
excerpt from cmd buffer generated by binary blob: 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */ 0x20000686, /* [01604] RS.CONFIG := SOURCE_FORMAT=A8R8G8B8,DOWNSAMPLE_X=0,DOWNSAMPLE_Y=0,SOURCE_TILED=1,DEST_FORMAT=A8R8G8B8,DEST_TILED=0,SWAP_RB=1,FLIP=0 */ 0x08010583, /* LOAD_STATE (1) Base: 0x0160C Size: 1 Fixp: 0 */ 0xc0001c00, /* [0160C] RS.SOURCE_STRIDE := STRIDE=0x1c00,MULTI=1,TILING=1 */ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */ 0x00000700, /* [01614] RS.DEST_STRIDE := STRIDE=0x700,MULTI=0,TILING=0 */ 0x0802058c, /* LOAD_STATE (1) Base: 0x01630 Size: 2 Fixp: 0 */ 0xffffffff, /* [01630] RS.DITHER[0] := 0xffffffff */ 0xffffffff, /* [01634] RS.DITHER[1] := 0xffffffff */ 0x00000000, /* PAD */ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */ 0x00000000, /* [0163C] RS.CLEAR_CONTROL := BITS=0x0,MODE=DISABLED */ 0x080105a8, /* LOAD_STATE (1) Base: 0x016A0 Size: 1 Fixp: 0 */ 0x00000000, /* [016A0] RS.EXTRA_CONFIG := AA=0x0,ENDIAN=NO_SWAP */ 0x080205b0, /* LOAD_STATE (1) Base: 0x016C0 Size: 2 Fixp: 0 */ 0x38910000, /* [016C0] RS.PIPE[0].SOURCE_ADDR := ADDR_I */ 0x3894b000, /* [016C4] RS.PIPE[1].SOURCE_ADDR := ADDR_27 */ 0x00000000, /* PAD */ 0x080105b8, /* LOAD_STATE (1) Base: 0x016E0 Size: 1 Fixp: 0 */ 0x38a37c00, /* [016E0] RS.PIPE[0].DEST_ADDR := ADDR_P */ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */ Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2014-02-08rs: pipe addresses for second pipe depnds on STRIDE_MULTIChristian Gmeiner
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2014-02-08pe: keep the state updates in order of addressChristian Gmeiner
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2014-02-08bo: print human readable type info if DEBUG is definedChristian Gmeiner
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2014-02-08rs: make it possible to define if dest/source is multi pipeChristian Gmeiner
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2014-02-08set correct address for PE_PIPE_COLOR_ADDR[1]Christian Gmeiner
this is what the binary blob does: ADDR_I: 0x38910000 allocated: 0x73000 gcvSURF_RENDER_TARGET used for: TS.COLOR_SURFACE_BASE

PE.PIPE[0].COLOR_ADDR ADDR_27:0x3894b000 used for: PE.PIPE[1].COLOR_ADDR Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2014-02-08PE: Depending on the number of pixel pipes we need to emitChristian Gmeiner
different values. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2014-01-27OLPC gcabi also has GCABI_CHIPIDENTITY_VARYINGSWladimir J. van der Laan
2014-01-27Add GCABI for OLPCWladimir J. van der Laan
2014-01-27Documentatino updateWladimir J. van der Laan
gc2000 have minorFeatures4, document the register, not that we know any of the bits yet...
2013-11-13Merge pull request #20 from austriancoder/masterWladimir J. van der Laan
small steps to get gc2000 up and running
2013-11-12fb demos: do not use rt_resource->last_ctx as it never gets setChristian Gmeiner
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>