This is a BIG hack.
Logging (as in kgsl_log.c) won't work anymore as it uses some weird
way to define registers based on the old register definitions.
Some FBC interrupt thing is really odd, there are no docs for it..
MMU config may be a little screwy - or not :)
Freescale's kernel driver does some things the Qualcomm driver
doesn't in some registers Qualcomm doesn't use. Odd, but kept the
FSL way since userspace may need to match and it's not worth the
work right now.
GSL_BLD_G12, GSL_BLD_YAMATO should always be turned on. It won't
affect i.MX35 or so (with only a Z160) because the platform device
doesn't initialize that unit and therefore nothing should ever
happen. May need investigating.
Remove IRQTHREAD_POLL stuff too as it was never, ever turned on.
This was removed in the initial stages of moving to a less abstracted
driver since Freescale never enabled it at the time. However, since
that time it's been enabled to improve stability, so we're putting it
back now to match Freescale.
Some of the mutex initialization I think is being done in a slightly
non-standard way (but the same way it's done in the Freescale kernel
since it's taken right from the old abstraction and just opencoded
instead of being a set of defines). Will investigate this later.
According to Qualcomm:
"We will never use a page size that is not the same as the system
page size, so replace KGSL_PAGESIZE, KGSL_PAGEMASK and KGSL_PAGESHIFT
with their system wide cousins."
We don't use the KGSL_PAGEMASK item yet since we do not run the
"new" memory manager.
Rename things and stop using typedefs for no good reason. Qualcomm have
a driver (a more advanced, modern version of the same thing) which the
new definitions have been derived from.
Case in point:
typedef int gsl_timestamp_t
A lot of the time this is case to an int or unsigned int inside the
code anyway to be passed to functions or compared. Example:
GSL_CMDSTREAM_GET_SOP_TIMESTAMP(device, (unsigned int*)×tamp);
Qualcomm's code uses an "unsigned int" in most versions (older code
used uint32_t which is the same thing anyway). It makes no sense to clutter
the code with pointless definitions of structures that hide the fact that
they are structures, or cast special types to the type they are defined
as in the first place, so all this mess gets removed.
So far this patch changes:
gsl_timestamp_t => unsigned int
gsl_device_t => struct kgsl_device
gsl_deviceid_t => unsigned int
gsl_memdesc_t => struct kgsl_memdesc
gsl_cmdwindow_t => enum kgsl_cmdwindow_type
gsl_timestamp_type_t => enum kgsl_timestamp_type
gpuaddr_t => uint32_t (probably should be a physaddr_t ?)
gsl_memregion_t => struct kgsl_memregion
gsl_devinfo_t => struct kgsl_devinfo
gsl_chipid_t => unsigned int
gsl_mmu_t => struct kgsl_mmu
gsl_pagetable_t => struct kgsl_pagetable
gsl_rect_t => struct kgsl_gmem_desc
include/api/gsl_types.h is a good reference for the changes if you
want a better summary.
It also renames some functions in the device tables which had unwieldy
names to the ones Qualcomm uses (device_addtimestamp => addtimestamp and
device_init => init, for example.
None of the contents or sizes of the types or structures has been
changed, so userspace should never notice.
This enables us to essentially look at the Qualcomm code and pull in
fixes or changes or hints (and slowly figure out the userspace
differences) at kernel side, by slowly migrating towards Qualcomm-looking
kernel code.
Such an old version of BFS is not maintained and while it gave us some
noticable benefits, it is not worth dealing with the problems it could
cause.
This reverts commit 469d88e87d.
Such an old version of BFS is not maintained and while it gave us some
noticable benefits, it is not worth dealing with the problems it could
cause.
This reverts commit 4259e4284d.
May be some more cleanups with this, it is not clear which tuners and devices
relate to each other so some drivers may be being built without dependent
tuners - V4L2 is such a mess. Either way this cuts down build time and install
footprint and affects practically nobody.
May be some more cleanups with this, it is not clear which tuners and devices
relate to each other so some drivers may be being built without dependent
tuners - V4L2 is such a mess. Either way this cuts down build time and install
footprint and affects practically nobody.
The AMD gpu driver memory manager is stupid to allocating
a memory block from the first free block. Neither check the
best fit free block. Here just add a little codes to
let allocation to find a best size fitted free block.
To avoid memory fragement.
Signed-off-by: Xinyu Chen <xinyu.chen@freescale.com>
increase max process number to fix gsl_kmod open issue
Signed-off-by: xianzhong <b07117@freescale.com>
Signed-off-by: Richard Liu <r66033@freescale.com>
Conflicts:
drivers/mxc/amd-gpu/include/gsl_buildconfig.h