Goran Pantar
|
Memory organization of driver for graphics hardware with fixed multiple layers
|
Goran Pantar
05/06/2009 9:12 AM
post28786
|
Memory organization of driver for graphics hardware with fixed multiple layers
Hi,
I'm writing a Photon graphic driver with support for layers. My target
graphical device supports multiple layers but their number and
organization (starting physical address, layer format ,stride...) is
predefined and fixed in hardware (FPGA) configuration.
I'm thinking to organize the driver memory context (adapter->mm_ctx) in
a way that I have several memory pools, one for each layer.
e.g.
#define MAX_LAYERS 5
typedef struct {
unsigned num_layers;
disp_vm_pool_t *layerPools[MAX_LAYERS];
}XX_mm_ctx_t;
mem_reset would initialize pools for all layers
alloc_surface would allocate memory from layer pool of default layer, or
system ram
alloc_layer_surface would allocate memory from respective layer pool
I'm new to QNX drivers and I'm not sure if this approach is reasonable
in case of such predefined layers.
Thanks,
Goran Pantar
|
|
|