Commit Graph

159794 Commits

Author SHA1 Message Date
Matt Sealey
bd2d54da05 amd-gpu: use Qualcomm's register definitions
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.
2012-11-26 12:10:35 -06:00
Matt Sealey
6734683032 amd-gpu: remove conditional build flags where not needed
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.
2012-11-26 10:10:32 -06:00
Matt Sealey
ddc542b6af amd-gpu: reintroduce fine-grained locking
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.
2012-11-26 09:43:27 -06:00
Matt Sealey
380e0fcdf2 renames to be closer to the qualcomm source file names for diffing purposes 2012-11-25 10:16:42 -06:00
Matt Sealey
bccbcd6485 GSL_PAGESIZE => PAGE_SIZE, GSL_PAGESIZE_SHIFT => PAGE_SHIFT
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.
2012-11-25 10:06:19 -06:00
Matt Sealey
b0b0c1b218 experiment: Linuxize the API
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*)&timestamp);

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.
2012-11-25 00:16:01 -06:00
Matt Sealey
9e902b2d15 Merge branch 'remove-bfs', remote-tracking branch 'origin' into amd-gpu 2012-11-25 00:07:41 -06:00
Matt Sealey
f35bfd5125 Merge branch 'amd-gpu' of github.com:genesi/linux-legacy into amd-gpu 2012-11-25 00:02:24 -06:00
Matt Sealey
d5eebcd215 config: re-enable PREEMPT, disable bzip2 ramdisks (waste of space) 2012-11-20 12:18:14 -06:00
Matt Sealey
db910a3b9b Back out BFS v376, step 2
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.
2012-11-20 12:09:28 -06:00
Matt Sealey
cb417eaf14 Back out BFS v376, step 1
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.
2012-11-20 12:08:37 -06:00
Matt Sealey
c0489d5cdc amd-gpu: remove unneeded barriers on hardware access
matches Freescale 2.6.38 kernel (ENGR00171209)
2012-11-19 21:32:45 +00:00
Matt Sealey
42f79c36bf amd-gpu: cleaned/added extra debug, plus use kzalloc instead of kmalloc/memset
Adds similar functionality as the following Freescale patch:

ENGR00142591 GPU: add some print message to help debug
2012-11-19 21:20:43 +00:00
Matt Sealey
467b7151ad efikamx: more config cutdowns, this time for TV tuners and related audio devices
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.
2012-11-19 18:08:36 +00:00
Matt Sealey
99af5ec735 efikamx: more config cutdowns, this time for TV tuners and related audio devices
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.
2012-11-19 12:00:27 -06:00
Xinyu Chen
210b9c4040 ENGR00160722 amd gpu: add best fit algorithm to memory manager
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>
2012-11-19 11:52:31 -06:00
Richard Zhao
1cae50aa16 ENGR00162464 update pm4 microcode: pm4_microcode_r18_20111020.a.inl.rel
It fix gpu hang.

Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
2012-11-19 11:41:33 -06:00
Richard Liu
8482a4dae7 ENGR00162193 amd gpu: fixed random gsl_kmod failure
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
2012-11-19 11:41:03 -06:00
Matt Sealey
a00ae67a63 config: drop OSS as nobody uses it 2012-11-16 21:48:16 +00:00
Matt Sealey
d21c266824 siihdmi: add 1600x900 to the common not-quite-1080p mode matching 2012-11-16 21:45:35 +00:00
Matt Sealey
ca15b03176 efikamx: remove drivers that are ancient and mostly clutter
This includes most DVB/USB stuff and JFS and XFS which nobody is using.
2012-11-09 11:13:52 -06:00
Matt Sealey
7229f8fd17 efikamx: update config to build in ext4 since it makes it easier to boot ramdisk-less systems 2012-11-09 09:20:53 -06:00
Matt Sealey
d1156b1817 backlight: match "DISP3 BG - DI1" as well as "DISP3 BG", solving issue with Smartbook backlight not turning off during screen blank
Mistaken use of strcmp vs. proper use of strncmp caused this
2012-07-31 15:04:57 -05:00
Matt Sealey
1196165ab6 sauce: fix an annoying compiler warning regarding set but unused variable (one of many, but this is the most repetitive) 2012-05-29 07:20:11 -05:00
Matt Sealey
89813bb753 gpu: fix the weird gpummu/nogpummu memory reservation/allocation mess, and disable the gpummu again for maximum stability 2012-05-16 07:09:18 -05:00
Matt Sealey
0580fd061d Merge branch 'master' of github.com:genesi/linux-legacy 2012-05-07 10:18:46 -05:00
Matt Sealey
fd9f6022dd add a cross-compiler suffix (for versions) so we don't need diversions or compiler slots to use other compilers 2012-05-07 10:16:52 -05:00
Matt Sealey
c456c38e49 helper scripts: modify the filename of the toolchain include so it doesn't conflict 2012-05-07 10:16:03 -05:00
Matt Sealey
44a6231768 siihdmi: introduce siihdmi.nohotplug=1 argument to disable the hotplug handler globally 2012-04-20 12:37:20 -05:00
Matt Sealey
6be1fd20cc efikamx: correct IPU revision again (it should be 2 for IPUv3EX however unintuitive that is, and 3 for IPUv3M on MX53). This fixes the IPU driver getting the correct base address. 2012-04-20 11:15:22 -05:00
Matt Sealey
455affb66e siihdmi: reintroduce the 480-600ms sleep after reset to allow hotplug to settle. 2012-04-19 19:15:49 -05:00
Matt Sealey
73cae9887a siihdmi: enable DEBUG so that DBG() messages are output 2012-04-19 17:46:57 -05:00
Matt Sealey
0adb2f1d0b siihdmi: strncmp would nuke if the mode in the current monitor database had no name 2012-04-19 16:54:34 -05:00
Matt Sealey
15c4470a5a checkpatch: egregious bump to the version from kernel 3.4rc1 2012-04-19 15:03:09 -05:00
Matt Sealey
af99f78e82 siihdmi: updated checkpatch run, fix a few other things including a serious memset argument order problem (argh!)
scripts/checkpatch.pl -f drivers/video/mxc/siihdmi.c --ignore=LONG_LINE,C99_COMMENTS
total: 0 errors, 0 warnings, 1555 lines checked

NOTE: Ignored message types: C99_COMMENTS LONG_LINE

drivers/video/mxc/siihdmi.c has no obvious style problems and is ready for submission.
2012-04-19 15:02:30 -05:00
Matt Sealey
c00322177f siihdmi: fix some checkpatch errors and realign some stuff to reduce warnings. Now we're only guilty of going over 80 columns, but Camelot is a silly place. 2012-04-19 14:43:34 -05:00
Matt Sealey
64cf5e0b27 siihdmi: downgrade to 640x480 output while getting EDID to match HDMI specification 2012-04-19 14:03:47 -05:00
Matt Sealey
9960ff68e1 siihdmi: clarify power modes debug 2012-04-19 14:01:42 -05:00
Matt Sealey
37cd50e9ff siihdmi: strncmp against modedb instead of structure memcmp to save time and effort matching CEA VIC 2012-04-19 13:59:01 -05:00
Matt Sealey
ddc6441e13 siihdmi: fix a division by zero when HDMI VSDB gives out 0 as the maximum TMDS clock capability 2012-04-19 13:55:52 -05:00
Matt Sealey
37c5293a2e siihdmi: comment about setting up interrupt service 2012-04-19 13:52:43 -05:00
Matt Sealey
d78c91e816 siihdmi: do the same msecs_to_jiffies for the identify timeout to match the DDC timeout 2012-04-19 13:49:56 -05:00
Matt Sealey
2bba60824f siihdmi: correct bus timeouts to convert ms to jiffies for the time_after function 2012-04-19 13:49:00 -05:00
Matt Sealey
badb686329 siihdmi: only mark insufficient margin in the mode list for 800x600 as all other modes tested actually seem to work okay. 2012-04-19 13:46:11 -05:00
Matt Sealey
1327336167 siihdmi: correct debug not to show display "power" on or off but more directly refer to "receiver sense" active or inactive. Also distinguish between the debug in the hotplug service loop and the almost identical output in the display setup code 2012-04-19 13:42:23 -05:00
Matt Sealey
a39558634a siihdmi: use SIIHDMI_NAME for driver data too 2012-04-19 13:39:15 -05:00
Matt Sealey
7c070eb308 siihdmi: rework debug statements not to redefine DEBUG, and use SIIHDMI_NAME 2012-04-19 13:37:00 -05:00
Matt Sealey
21371b733b siihdmi: add definition of driver name to simplify debug statements (header) 2012-04-19 13:24:59 -05:00
Matt Sealey
89e13e660a efikamx: correct IPU version and don't want 600ms for SIIHDMI reset (it doesn't take that long) 2012-04-19 13:23:30 -05:00
Matt Sealey
39a894043f build: workaround for Linaro gcc-4.6 cross compilers 2012-03-26 17:34:03 -05:00