summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2013-11-07ion: move into stagingColin Cross
Move ion from drivers/gpu/ion to drivers/android/staging/ion. Change-Id: Id6e996aa3954cbb8e1a8abc9578a56204f5eb211 Signed-off-by: Colin Cross <ccross@android.com>
2013-11-07gpu: ion: delete ion_system_mapper.cColin Cross
The mapper abstraction layer was removed before the initial ion commit, but a stray ion_system_mapper.c file was left in. Delete it. Change-Id: I0001d1ea1b866ebd7ec1306e94472c67a094855f Signed-off-by: Colin Cross <ccross@android.com>
2013-10-31drivers: switch: remove S_IWUSR from dev_attrQiao Zhou
it doesn't need S_IWUSR attribute since xxx_store API is un-needed. otherwise the WARN check in device_create_file will alert. Change-Id: I6360bf022dcd659bfb3f41c84624f954d5d15ea5 Signed-off-by: Qiao Zhou <zhouqiao@marvell.com>
2013-10-29Merge branch 'android-3.10-adf' into android-3.10Greg Hackmann
2013-10-24ion: add compat_ioctlRom Lemarchand
Add a compat_ioctl to the ion driver Change-Id: I43da387e22ff9c4a29f0159dfe9e898efc500553 Signed-off-by: Rom Lemarchand <romlem@google.com>
2013-10-24ion: change ion_user_handle_t definition to intRom Lemarchand
Turn ion_user_handle_t to int. This change reflects the underlying type returned by the ion driver. Change-Id: I40390dae8138327769510525bf62e55877a4b37d Signed-off-by: Rom Lemarchand <romlem@google.com>
2013-10-24usb: gadget: android: Remove device if probe failsBenoit Goby
Make sure the android0 device is removed before we can destroy the class. Change-Id: Id584888c407beb80a1df4990f73fe31ccb9d4767 Signed-off-by: Benoit Goby <benoit@android.com>
2013-10-24video: adf: expose adf_modeinfo_set_{name,vrefresh} to driversGreg Hackmann
Change-Id: Id9f8b2184927a77b244ce0b33d619d6e44a0f17a Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-10-24video: adf: set default interface dpms_state to OFFGreg Hackmann
Interfaces default to unplugged, so they should also default to off Change-Id: I36500a54b11f354a0d7dd2c9924a79e0d9c6f855 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-10-24video: adf: make dpms_state sysfs attribute writableGreg Hackmann
Change-Id: I04e7785cbddac160003e6c9edaf62d20b367fdc9 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-10-24video: adf: add helpers for validating custom formatsGreg Hackmann
Many custom formats look a lot like the standard ones, but with different subsampling, bpp, etc. Expose and document adf_buffer_validate()'s main body, so drivers can reuse its logic when validating these formats. Change-Id: I1d06981c9e5aab26f3ab2956c08c679f2c823bcc Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-10-24sync: Fix a race condition between release_obj and print_objAlistair Strachan
Before this change, a timeline would only be removed from the timeline list *after* the sync driver had its release_obj() called. However, the driver's release_obj() may free resources needed by print_obj(). Although the timeline list is locked when print_obj() is called, it is not locked when release_obj() is called. If one CPU was in print_obj() when another was in release_obj(), the print_obj() may make unsafe accesses. It is not actually necessary to hold the timeline list lock when calling release_obj() if the call is made after the timeline is unlinked from the list, since there is no possibility another thread could be in -- or enter -- print_obj() for that timeline. This change moves the release_obj() call to after the timeline is unlinked, preventing the above race from occurring. Signed-off-by: Alistair Strachan <alistair.strachan@imgtec.com> (cherry picked from commit 3bfc1e9e0c7d0c0e3f52ee1f3803482416afa295) Change-Id: Ib2b2b23fde5be34016f9d86b8b9c5e561b56cd4c
2013-10-24ion: add new ion_user_handle_t type for the user-space tokenRom Lemarchand
Declare new ion_user_handle_t type to contain the token returned to user-space. This allows a 2-step migration of the user-space code to a new kernel header first, then will allow us to change the definition of the ion_user_handle_type_t to int without breaking the API. Change-Id: I4200b6600df8e56fe98cf1580a13a65cb25ec646 Signed-off-by: Rom Lemarchand <romlem@google.com> (cherry picked from commit ebb8269bbb05b06ecedca3e21b3e65f23d48eadd)
2013-10-16cpufreq: interactive: delete timers for GOV_STARTShridhar Rasal
Make sure that timers cpu_timer and cpu_slack_timer deactivated before addition of new. Change-Id: If31c4049606871df6f00efdc24b1d713c86a6f69 Signed-off-by: Shridhar Rasal <srasal@nvidia.com> Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
2013-10-15cpufreq: Interactive: Implement per policy instances of governorViresh Kumar
If we have a multi-package system, where we have multiple instances of struct policy (per package), currently we can't have multiple instances of same governor. i.e. We can't have multiple instances of Interactive governor for multiple packages. This is a bottleneck for multicluster system, where we want different packages to use Interactive governor, but with different tunables. This patch uses the infrastructure provided by earlier patches pushed in Mainline in v3.10-rc1/rc2 and implements per policy instances of Interactive governor. Change-Id: I70436d4a5a45c6cb6edf37f3e46d0b9fbc930982 [toddpoynor@google.com: merge with later code, minor changes] Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2013-10-15cpufreq: interactive: Move definition of cpufreq_gov_interactive downwardsViresh Kumar
This moves definition of cpufreq_gov_interactive towards the bottom of file, so that we don't have to add prototype of cpufreq_governor_interactive() in the beginning of file. Change-Id: I04bd1004954eb36502c5cd7e35d3d7274cddaf95 Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2013-10-15cpufreq: interactive: Remove unnecessary cpu_online() checkViresh Kumar
Cpufreq no longer calls governor callback for offlined cpus. i.e. All policy->cpus are guaranteed to be online. Hence we don't need explicit check to see if cpu is online or not. Change-Id: I9ad85ea4addd5b4a40952e59ed730dd15e328690 Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2013-10-13sync: signal pt before sync_timeline object gets destroyedPrakash Kamliya
There is a race condition Assume we have *one* sync_fence object, with *one* sync_pt which belongs to *one* sync_timeline, given this condition, sync_timeline->kref will have two counts, one for sync_timeline (implicit) and another for sync_pt. Assume following is the situation on CPU Theead-1 : (Thread which calls sync_timeline_destroy()) -> (some function calls) -> sync_timeline_destory() -> sync_timeline_signal() (CPU is inside this function after putting reference to sync_timeline) At this time Thread-2 comes and does following Thread-2 : (fclose on fence fd) > sync_fence_release() -> because of fclose() on fence object -> sync_fence_free() -> sync_pt_free() -> kref_put(&pt->parent->kref, sync_timeline_free); -> sync_timeline_free() (CPU is inside this because this time kref will be zero after _put) Thread-2 will free sync_timeline object before Thread-1 has finished its work inside sync_timeline_signal. With this change we signals all sync_pt before putting reference to sync_timeline object. Change-Id: Ic680e4d0bbef1c46bcb7cfba693395645241d203 Signed-off-by: Prakash Kamliya <pkamliya@codeaurora.org>
2013-10-11video: adf: add informational flags to interfacesGreg Hackmann
Informational flags don't affect ADF directly but may be useful to clients. Currently used to indicate primary and external displays. Change-Id: I343c7f0148da0869244c8e818350e9855525df85 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-10-11video: adf: add fbdev compatibility helperGreg Hackmann
Change-Id: I2b82bb625f805e8edb27799743b290dda5befb97 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-10-11video: adf: add supported formats to adf_overlay_engine_dataGreg Hackmann
Change-Id: If2aa783b9ece60160f465bf697508fc58682e1bc Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-10-11video: adf: support "simple" buffersGreg Hackmann
Simple buffers are linear RGB buffers analogous to KMS's dumb buffers. Simple buffers can be allocated and posted to a display interface without any driver-private data. Internally, ADF drivers provide the driver-private data needed (if any) to post a simple buffer to the display. Change-Id: Ib0b737622eaf343111310f6623f99d69cf3807d2 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-10-11video: adf: add memblock helperGreg Hackmann
Provides a dma-buf exporter for memblocks, mainly useful for ADF devices to wrap their bootloader logos Change-Id: I936a9b5df099ab6084d433fcaf50f3bc29f93289 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-10-11video: add atomic display frameworkGreg Hackmann
Change-Id: I693257e269a99012cd0dbb57576ac222869cf4c7 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-10-11staging: sw_sync: add stubs for kernels without CONFIG_SW_SYNCGreg Hackmann
Change-Id: I7a12679eb3c10b1beaf36c6612cf2e3f6662a034 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-09-19USB: remove duplicate out endpoint creation in MTP modePeter Oh
Android MTP gadget uses 3 endpoints which are 1 in endpoint, 1 out endpoint, and 1 interrupt endpoint. However when MTP gadget creates its endpoints, it creates the out endpoint twice and overwrites the first created out endpoint with the second one, so that it causes a leak of endpoint resources. Change-Id: Iba82950095610b26b362f4b10a67cedfb1fee366 Signed-off-by: Peter Oh <poh@broadcom.com> Reviewed-on: http://mps-gerrit.broadcom.com/37744 Reviewed-by: Graham Williams <gwilli@broadcom.com> Reviewed-by: John Garry <jgarry@broadcom.com> Branch-Open: Branch Status <branch_status_noreply@broadcom.com> Reviewed-by: Checkpatch Status <checkpatch_status_noreply@broadcom.com> Reviewed-by: Joyjit Nath <joyjit@broadcom.com> Tested-by: AutoSubmit Status <autosubmit_status_noreply@broadcom.com>
2013-09-19cpufreq: interactive: fix show_target_loads and show_above_hispeed_delayMinsung Kim
Remove a trailing whitespace from target_loads and above_hispeed_delay. Problem happens when user-space program tried to restore parameters that saved before changing parameters. In this case was returned error(EINVAL). Change-Id: I5a74e3824602cd6f2b74651adda5ec1b627e61e9 Signed-off-by: Minsung Kim <ms925.kim@samsung.com>
2013-09-19ion: don't use id 0 for handle cookieColin Cross
ion userspace clients think that the cookie is a pointer, so they use NULL to check if the handle has been initialized. Set the first id number to 1. Change-Id: Ifb9af6029a8b08f57e41bc6160cc11e11001a2a9 Signed-off-by: Colin Cross <ccross@android.com>
2013-09-19ion: index client->handles rbtree by bufferColin Cross
The only remaining users of the client->handles rbtree are iterating through it like a list. Keep the rbtree, but change its index to be the buffer address instead of the handle address, which makes ion_handle_lookup a fast rbtree search. Change-Id: Ie7d974b3a5d9831c0d664de85ddae8db3c3abdf9 Signed-off-by: Colin Cross <ccross@android.com>
2013-09-19ion: replace userspace handle cookies with idrColin Cross
Userspace handles should not leak kernel virtual addresses to userspace. They have to be validated by looking them up in an rbtree anyways, so replace them with an idr and validate them by using idr_find to convert the id number to the struct ion_handle pointer. Change-Id: Iab5667ba6f3a73256fec3949b23a9a6f8e14a283 Signed-off-by: Colin Cross <ccross@android.com>
2013-09-19ion: remove IS_ERR_OR_NULLColin Cross
IS_ERR_OR_NULL is often part of a bad pattern that can accidentally return 0 on error: if (IS_ERR_OR_NULL(ptr)) return PTR_ERR(ptr); It also usually means that the errors of a function are not well defined. Replace all uses in ion.c by ensure that the return type of any function in ion is an ERR_PTR. Specify that the expected return value from map_kernel or map_dma heap ops is ERR_PTR, and warn if a heap returns NULL. Change-Id: I6e7ea0d2e62fa08d4e372a7ef6da649f7a62289c Signed-off-by: Colin Cross <ccross@android.com>
2013-09-19ion: convert map_kernel to return ERR_PTRColin Cross
ion is going to stop accepting NULL as an error value, use ERR_PTR. Change-Id: I030e8b72138904e38a4a5d225beaaa98427651fb Signed-off-by: Colin Cross <ccross@android.com>
2013-09-19ion: add free list size to heap debug filesColin Cross
Change-Id: I3c6309afdbd661a2f870fd1ba3fea9543e229882 Signed-off-by: Colin Cross <ccross@android.com>
2013-09-19ion: chunk_heap: fix leak in allocated counterColin Cross
buffer->size is controlled by the outer ion layer, don't modify it inside the heap. Instead, compute the rounded up allocated size on demand. Change-Id: I288ffc1221ce96cfe2591468502ac3279065bde4 Signed-off-by: Colin Cross <ccross@android.com>
2013-09-19power_supply: kill android-battery driverTodd Poynor
Discontinued in favor of future userspace charging helpers. Change-Id: I840a94ff42e2219cfd8759f919f6188355a63d92 Signed-off-by: Todd Poynor <toddpoynor@google.com>
2013-09-19gpu: ion: Fix performance issue in faulting codeRebecca Schultz Zavin
Previously the code to fault ion buffers in one page at a time had a performance problem caused by the requirement to traverse the sg list looking for the right page to load in (a result of the fact that the items in the list may not be of uniform size). To fix the problem, for buffers that will be faulted in, also keep a flat array of all the pages in the buffer to use from the fault handler. To recover some of the additional memory footprint this creates per buffer, dirty bits used to indicate which pages have been faulted in to the cpu are now stored in the low bit of each page struct pointer in the page array. Change-Id: I891b077dc0c88ed6d416b256626d8778fd67be84 Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2013-09-19gpu: ion: add CMA heapBenjamin Gaignard
New heap type ION_HEAP_TYPE_DMA where allocation is done with dma_alloc_coherent API. device coherent_dma_mask must be set to DMA_BIT_MASK(32). ion_platform_heap private field is used to retrieve the device linked to CMA, if NULL the default CMA area is used. ion_cma_get_sgtable is a copy of dma_common_get_sgtable function which should be in kernel 3.5 Change-Id: If4b1a3f9c8a6bd72053226208832f4971e44372f Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
2013-07-01misc: uidstat: Remove use of obsolete create_proc_read_entry apiArve Hjønnevåg
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-07-01mmc: core: Remove stray CONFIG_EXPERIMENTAL dependenciesJohn Stultz
CONFIG_EXPERIMENTAL has been removed from the kernel, so clean up its use in MMC_EMBEDDED_SDIO and MMC_PARANOID_SD_INIT options. Change-Id: If414c265134b36740a84564274a631803c8e81b4 Cc: Arve Hjønnevåg <arve@android.com> Cc: San Mehat <san@google.com> Cc: Android Kernel Team <kernel-team@android.com> Reported-by: Jon Medhurst (Tixy) <tixy@linaro.org> Signed-off-by: John Stultz <john.stultz@linaro.org>
2013-07-01ion: Add Kconfig dependency to ARMJohn Stultz
The ion code has some very specific arm-isms which keeps it from building on other architectures. These should probably be resolved, but in the mean time, add a dependency on CONFIG_ARM to avoid build failures. v2: Fix earlier flub, sending out an early untested version of the patch. Change-Id: I5979af1ad59d1eeddd9e08763b1cbc946cf82339 Cc: Arve Hjønnevåg <arve@android.com> Cc: Rebecca Schultz Zavin <rebecca@android.com> Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org>
2013-07-01usb: gadget: android: 3.10 fixesArve Hjønnevåg
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-07-01usb: gadget: android: move init to late_initcall for nowArve Hjønnevåg
gserial_alloc_line crashes when called from module_init Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-07-01usb: gadget: android: Fixes and hacks to make android usb gadget compile on 3.9Arve Hjønnevåg
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-07-01usb: gadget: Fix android gadget driver buildBenoit Goby
Removed obsolete f_adb function Change-Id: Idfb4110429bc0ea63f493c68ad667f49ca471987 Signed-off-by: Benoit Goby <benoit@android.com>
2013-07-01HACK: usb: gadget: Fix enumeration on bootBenoit Goby
The Android gadget driver disconnects the gadget on bind and expects the gadget to stay disconnected until it calls usb_gadget_connect when userspace is ready. Removed the call to usb_gadget_connect in usb_gadget_probe_driver to avoid enabling the pullup before userspace is ready. Change-Id: I63707ac6e16a44eca52351a4bf80407d25fbd35e Signed-off-by: Benoit Goby <benoit@android.com>
2013-07-01usb: gadget: android: Fixes and hacks to make android usb gadget compile on 3.8Arve Hjønnevåg
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-07-01mmc: block: Remove call to mmc_blk_set_blksizeArve Hjønnevåg
It no longer exists. Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-07-01gpu: ion: Remove __GFP_NO_KSWAPDArve Hjønnevåg
It no longer exists. Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-07-01gpu: ion: __dma_page_cpu_to_dev -> arm_dma_ops.sync_single_for_device hackArve Hjønnevåg
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-07-01usb: otg: otg-wakelock: Fix build for 3.7Arve Hjønnevåg
Signed-off-by: Arve Hjønnevåg <arve@android.com>