summaryrefslogtreecommitdiff
path: root/drivers/video/omap2/omapfb/omapfb-main.c
AgeCommit message (Collapse)Author
2012-11-19OMAPFB: Delete if statement evaluating a constant.Matthias Brugger
Variable r is never set to any value different to zero. Delete the if statement as it will never executed. Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-11-16Merge branch '3.8/vram-conversion' of git://gitorious.org/linux-omap-dss2/linuxTomi Valkeinen
Conflicts: drivers/video/omap2/dss/Kconfig drivers/video/omap2/omapfb/omapfb-ioctl.c drivers/video/omap2/omapfb/omapfb-main.c Merge changes to make omapfb use common dma_alloc, and remove omap's custom vram allocator.
2012-11-13OMAPFB: use dma_alloc_attrs to allocate memoryTomi Valkeinen
Use dma_alloc_attrs to allocate memory instead of omap specific vram allocator. After this we can remove the omap vram allocator. There are some downsides to this change: 1) dma_alloc_attrs doesn't let us allocate at certain physical address. However, this should not be a problem as this feature of vram allocator is only used when reserving the framebuffer that was initialized by the bootloader, and we don't currently support "passing" a framebuffer from the bootloader to the kernel anyway. 2) dma_alloc_attrs, as of now, always ioremaps the allocated area, and we don't need the ioremap when using VRFB. This patch uses DMA_ATTR_NO_KERNEL_MAPPING for the allocation, but the flag is currently not operational. 3) OMAPFB_GET_VRAM_INFO ioctl cannot return real values anymore. I changed the ioctl to return 64M for all the values, which, I hope, the applications will interpret as "there's enough vram". 4) "vram" kernel parameter to define how much ram to reserve for video use no longer works. The user needs to enable CMA and use "cma" parameter. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-10-29OMAPFB: improve mode selection from EDIDTomi Valkeinen
The current omapfb code goes over all the modes found from the monitors EDID data, and searches for a mode that is compatible with the DSS hardware and has the highest x-res. While this works ok as such, it proves problematic when using DSI PLL for pixel clock. Calculating DSI PLL dividers is not the fastest of the operations, and while doing it for one mode is usually ok, doing it for 20 modes is noticable. Also, the first mode given in the EDID data should be the native mode of the monitor, and thus also the best mode, so if that can be used, no need to look further. This patch changes the code to use the first mode that is compatible with the DSS hardware. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-10-29OMAPFB: remove use of extended edid blockTomi Valkeinen
It seems that using the second EDID block causes more problems than is of any help. The first mode in the extended block will get FB_MODE_IS_FIRST set, which will override the first mode from the first EDID block, thus making the default videomode selection not to work properly. This patch removes the use of the extended edid block for now. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-10-29OMAPDSS: remove initial display code from omapdssTomi Valkeinen
Currently omapdss driver sets up the initial connections between overlays, overlay manager and a panel, based on default display parameter coming from the board file or via module parameters. This is unnecessary, as it's the higher level component that should decide what display to use and how. This patch removes the code from omapdss, and implements similar code to omapfb. The def_disp module parameter and the default display platform_data parameter are kept in omapdss, but omapdss doesn't do anything with them. It will just return the default display name with dss_get_default_display_name() call, which omapfb uses. This is done to keep the backward compatibility. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-10-24OMAPDSS: remove omap_dss_device's suspend/resumeTomi Valkeinen
The panel drivers contain enable, disable, suspend and resume calls. The suspend and resume are effectively identical to disable and enable. This patch removes panel suspend and enable code from omapdss and the panel drivers, and replaces their use with enable and disable. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-10-17OMAPFB: use omap_vrfb_supported()Tomi Valkeinen
Replace cpu_is_*() check with omap_vrfb_supported(). Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-10-17OMAP: move arch/arm/plat-omap/include/plat/vrfb.hTomi Valkeinen
Now that vrfb driver is not omap dependent anymore, we can move vrfb.h from arch/arm/plat-omap/include/plat to include/video/omapvrfb.h. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Tony Lindgren <tony@atomide.com> Cc: Vaibhav Hiremath <hvaibhav@ti.com>
2012-10-12Merge tag 'fbdev-updates-for-3.7' of git://github.com/schandinat/linux-2.6Linus Torvalds
Pull fbdev updates from Florian Tobias Schandinat: "This includes: - large updates for OMAP - basic OMAP5 DSS support for DPI and DSI outputs - large cleanups and restructuring - some update to Exynos and da8xx-fb - removal of the pnx4008 driver (arch removed) - various other small patches" Fix up some trivial conflicts (mostly just include line changes, but also some due to the renaming of the deferred work functions by Tejun). * tag 'fbdev-updates-for-3.7' of git://github.com/schandinat/linux-2.6: (193 commits) gbefb: fix compile error video: mark nuc900fb_map_video_memory as __devinit video/mx3fb: set .owner to prevent module unloading while being used video: exynos_dp: use clk_prepare_enable and clk_disable_unprepare drivers/video/exynos/exynos_mipi_dsi.c: fix error return code drivers/video/savage/savagefb_driver.c: fix error return code video: s3c-fb: use clk_prepare_enable and clk_disable_unprepare da8xx-fb: save and restore LCDC context across suspend/resume cycle da8xx-fb: add pm_runtime support video/udlfb: fix line counting in fb_write OMAPDSS: add missing include for string.h OMAPDSS: DISPC: Configure color conversion coefficients for writeback OMAPDSS: DISPC: Add manager like functions for writeback OMAPDSS: DISPC: Configure writeback FIFOs OMAPDSS: DISPC: Configure writeback specific parameters in dispc_wb_setup() OMAPDSS: DISPC: Configure overlay-like parameters in dispc_wb_setup OMAPDSS: DISPC: Add function to set channel in for writeback OMAPDSS: DISPC: Don't set chroma resampling bit for writeback OMAPDSS: DISPC: Downscale chroma if plane is writeback OMAPDSS: DISPC: Configure input and output sizes for writeback ...
2012-10-09mm: kill vma flag VM_RESERVED and mm->reserved_vm counterKonstantin Khlebnikov
A long time ago, in v2.4, VM_RESERVED kept swapout process off VMA, currently it lost original meaning but still has some effects: | effect | alternative flags -+------------------------+--------------------------------------------- 1| account as reserved_vm | VM_IO 2| skip in core dump | VM_IO, VM_DONTDUMP 3| do not merge or expand | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP 4| do not mlock | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP This patch removes reserved_vm counter from mm_struct. Seems like nobody cares about it, it does not exported into userspace directly, it only reduces total_vm showed in proc. Thus VM_RESERVED can be replaced with VM_IO or pair VM_DONTEXPAND | VM_DONTDUMP. remap_pfn_range() and io_remap_pfn_range() set VM_IO|VM_DONTEXPAND|VM_DONTDUMP. remap_vmalloc_range() set VM_DONTEXPAND | VM_DONTDUMP. [akpm@linux-foundation.org: drivers/vfio/pci/vfio_pci.c fixup] Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Carsten Otte <cotte@de.ibm.com> Cc: Chris Metcalf <cmetcalf@tilera.com> Cc: Cyrill Gorcunov <gorcunov@openvz.org> Cc: Eric Paris <eparis@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Hugh Dickins <hughd@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Morris <james.l.morris@oracle.com> Cc: Jason Baron <jbaron@redhat.com> Cc: Kentaro Takeda <takedakn@nttdata.co.jp> Cc: Matt Helsley <matthltc@us.ibm.com> Cc: Nick Piggin <npiggin@kernel.dk> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Robert Richter <robert.richter@amd.com> Cc: Suresh Siddha <suresh.b.siddha@intel.com> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: Venkatesh Pallipadi <venki@google.com> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-09-26OMAPFB: remove manager->device referencesArchit Taneja
With the introduction of output entities, managers will now connect to outputs. Use the helper op for overlays named get_device. This will abstract away the information on how to get the device from an overlay. Using the helper function will reduce the number of pointer dereferences a user of OMAPDSS needs to do and reduce risk of a NULL dereference. Signed-off-by: Archit Taneja <archit@ti.com>
2012-09-12ARM: OMAP2+: Prepare for irqs.h removalTony Lindgren
As the interrupts should only be defined in the platform_data, and eventually coming from device tree, there's no need to define them in header files. Let's remove the hardcoded references to irqs.h and fix up the includes so we don't rely on headers included in irqs.h. Note that we're defining OMAP_INTC_START as 0 to the interrupts. This will be needed when we enable SPARSE_IRQ. For some drivers we need to add #include <plat/cpu.h> for now until these drivers are fixed to remove cpu_is_omapxxxx() usage. While at it, sort som of the includes the standard way, and add the trailing commas where they are missing in the related data structures. Note that for drivers/staging/tidspbridge we just define things locally. Cc: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-09-11OMAPFB: Clear framebuffers before they are registeredArchit Taneja
The framebuffers are cleared with the function omapfb_clear_fb(), which internally calls cfb_fillrect(). The boot logo is copied on to the framebuffer when the fb device is registered with fb framework. omapfb_clear_fb() is called after the framebuffer is registered, leading to the boot logo getting cleared. Clear the framebuffers using omapfb_clear_fb() before registering the framebuffer devices. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-09-07OMAPFB: clear framebuffers with CPUTomi Valkeinen
Currently vram.c clears the allocated memory automatically using OMAP system DMA. In an effort to reduce OMAP dependencies, we'll do the memory clear with CPU from now on. This patch implements clearing of the framebuffer in omapfb, using cfb_fillrect() to do the actual clear. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-08-23OMAPFB: fix framebuffer console colorsGrazvydas Ignotas
omapfb does not currently set pseudo palette correctly for color depths above 16bpp, making red text invisible, command like echo -e '\e[0;31mRED' > /dev/tty1 will display nothing on framebuffer console in 24bpp mode. This is because temporary variable is declared incorrectly, fix it. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Cc: stable@vger.kernel.org # v3.x Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-08-10OMAPFB: fix framebuffer console colorsGrazvydas Ignotas
omapfb does not currently set pseudo palette correctly for color depths above 16bpp, making red text invisible, command like echo -e '\e[0;31mRED' > /dev/tty1 will display nothing on framebuffer console in 24bpp mode. This is because temporary variable is declared incorrectly, fix it. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-06-29OMAPFB: Map interlace field in omap_video_timings with fb vmode flagsArchit Taneja
Use the interlace field in omap_video_timings to configure/retrieve corresponding fb mode flags in fb_var_screeninfo and fb_videomode. The interlace field maps with the fb mode flags FB_VMODE_INTERLACED and FB_VMODE_NONINTERLACED. Signed-off-by: Archit Taneja <archit@ti.com>
2012-06-29OMAPFB: Map the newly added omap_video_timings fields with fb sync flagsArchit Taneja
Use the newly added fields in omap_video_timings(hsync, vsync and data_enable logic levels and data, hsync and vsync latching related info) to configure/retrieve corresponding sync flags in fb_var_screeninfo and fb_videomode. Out of the new fields, hsync_level and vsync_level can be mapped to the fb sync flags FB_SYNC_HOR_HIGH_ACT and FB_SYNC_VERT_HIGH_ACT. When converting fb mode to omap_video_timings, the fields which don't have an equivalent parameter in fb are kept as the original values if the panel driver has a get_timings op, else they are set to default values. Signed-off-by: Archit Taneja <archit@ti.com>
2012-05-22OMAPFB: remove compiler warnings when CONFIG_BUG=nTomi Valkeinen
If CONFIG_BUG is not enabled, BUG() does not stop the execution. Many places in code expect the execution to stop, and this causes compiler warnings about uninitialized variables and returning from a non-void function without a return value. This patch fixes the warnings by initializing the variables and returning properly after BUG() lines. However, the behaviour is still undefined after the BUG, but this is the choice the user makes when using CONFIG_BUG=n. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-05-11OMAPFB: add __init & __exitTomi Valkeinen
Change omapfb to use platform_driver_probe and add __init & __exit. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-05-11OMAPFB: fix parsing of vram parameterTomi Valkeinen
omapfb_parse_vram_param()'s check for end pointer returned from simple_strtoul() is wrong, causing the code to bug if the second or later vram parameters are non-parseable, for example "omapfb.vram=0:2M,:5M". However, even in that case the code will most likely bail out with -EINVAL in the following checks, so the bug is probably not a fatal one. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reported-by: Hein Tibosch <hein_tibosch@yahoo.es>
2012-02-23OMAPFB: remove unused fb_format_to_dss_mode()Tomi Valkeinen
fb_format_to_dss_mode() function is no longer used, so remove it. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-02-23OMAPFB: remove mem info from platform_dataTomi Valkeinen
omapfb driver used platform_data to get fb memory areas and formats defined by the board file. This patch removes omapfb's (both old and new omapfb) use of the memory data in platform_data, because: - No board uses them currently - It's not board file's job to define things like amount of default framebuffer memory. These should come from the bootloader via command line parameters. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-02-23OMAPDSS: Remove video SRAM supportTomi Valkeinen
OMAP SRAM can be used as video memory on OMAP1 and 2. However, there usually is very little SRAM available, thus limiting its use, and no board supported by the kernel currently uses it. This patch removes the use of SRAM as video ram for the omapdss driver to simplify memory handling. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Tony Lindgren <tony@atomide.com>
2012-01-14Merge branch 'fbdev-next' of git://github.com/schandinat/linux-2.6Linus Torvalds
* 'fbdev-next' of git://github.com/schandinat/linux-2.6: (175 commits) module_param: make bool parameters really bool (drivers/video/i810) Revert "atmel_lcdfb: Adjust HFP calculation so it matches the manual." OMAPDSS: HDMI: Disable DDC internal pull up OMAPDSS: HDMI: Move duplicate code from boardfile OMAPDSS: add OrtusTech COM43H4M10XTC display support OMAP: DSS2: Support for UMSH-8173MD TFT panel ASoC: OMAP: HDMI: Move HDMI codec trigger function to generic HDMI driver OMAPDSS: HDMI: Create function to enable HDMI audio ASoC: OMAP: HDMI: Correct signature of ASoC functions ASoC: OMAP: HDMI: Introduce driver data for audio codec grvga: fix section mismatch warnings video: s3c-fb: Don't keep device runtime active when open video: s3c-fb: Hold runtime PM references when touching registers video: s3c-fb: Take a runtime PM reference when unblanked video: s3c-fb: Disable runtime PM in error paths from probe video: s3c-fb: Use s3c_fb_enable() to enable the framebuffer video: s3c-fb: Make runtime PM functional again drivers/video: fsl-diu-fb: merge fsl_diu_alloc() into map_video_memory() drivers/video: fsl-diu-fb: add default platform ops functions drivers/video: fsl-diu-fb: remove broken reference count enabling the display ...
2012-01-13module_param: make bool parameters really bool (drivers & misc)Rusty Russell
module_param(bool) used to counter-intuitively take an int. In fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy trick. It's time to remove the int/unsigned int option. For this version it'll simply give a warning, but it'll break next kernel version. Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-12-02OMAPDSS: APPLY: move ovl->info to apply.cTomi Valkeinen
struct omap_overlayr contains info and info_dirty fields, both of which should be internal to apply.c. This patch moves those fields into ovl_priv data, and names them user_info and user_info_dirty. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: APPLY: rewrite overlay enable/disableTomi Valkeinen
Overlays are currently enabled and disabled with a boolean in the struct omap_overlay_info. The overlay info is set with ovl->set_overlay_info(), and made into use with mgr->apply(). This doesn't work properly, as the enable/disable status may affect also other overlays, for example when using fifo-merge. Thus the enabling and disabling of the overlay needs to be done outside the normal overlay configuration. This patch achieves that by doing the following things: 1) Add function pointers to struct omap_overlay: enable(), disable() and is_enabled(). These are used to do the obvious. The functions may block. 2) Move the "enabled" field from struct omap_overlay to ovl_priv_data. 3) Add a new route for settings to be applied to the HW, called "extra_info". The status of the normal info and extra_info are tracked separately. The point here is to allow the normal info to be changed and applied in non-blocking matter, whereas the extra_info can only be changed when holding the mutex. This makes it possible to, for example, set the overlay enable flag, apply it, and wait until the HW has taken the flag into use. This is not possible if the enable flag would be in the normal info, as a new value for the flag could be set at any time from the users of omapdss. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-09-30OMAPDSS: remove vaddr from overlay infoTomi Valkeinen
overlay_info struct, used to configure overlays, currently includes both physical and virtual addresses for the pixels. The vaddr was added to support more exotic configurations where CPU would be used to update a display, but it is not currently used and there has been no interest in the feature. Using CPU to update a screen is also less interesting now that OMAP4 has two LCD outputs. This patch removes the vaddr field, and modifies the users of omapdss accordingly. This makes the use of omapdss a bit simpler, as the user doesn't need to think if it needs to give the vaddr. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-09-30OMAPFB: find best mode from edidTomi Valkeinen
Use the new read_edid() function to get EDID information from the display (when available), and use the information to use a suitable mode at initialization time. Hot-plug is not yet supported, so the timings selected at init time will stay even if the monitor would be changed. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-09-30OMAP: OMAPFB: make omapfb start even when a display is missing a driverTomi Valkeinen
Currently omapfb wants that all the display devices have a driver, otherwise omapfb refuses to start. There's no real requirement to act like that, and this patch will make omapfb give a warning and skip that device. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-09-14OMAPFB: make debug message more usefulAndy Doan
Make the debug message useful by printing the name of the device that no associated driver could be found for. Signed-off-by: Andy Doan <andy.doan@linaro.org> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-07-01OMAP: DSS2: OMAPFB: Implement auto-update modeTomi Valkeinen
Implement auto-update mode for manual-update displays. omapfb driver uses a delayed work to update the display with a constant rate. The update mode can be changed via OMAPFB_SET_UPDATE_MODE ioctl, which previously called omapdss but is now handled inside omapfb, and a new sysfs file, "update_mode". The update interval is by default 20 times per second, but can be changed via "auto_update_freq" module parameter. There is also a new module parameter "auto_update", which will make omapfb start manual update displays in auto-update mode. This auto-update mode can be used for testing if the userspace does not support manual update displays properly. However, it is a very inefficient solution, and should be considered more as a hack for testing than something that could be used as a long term solution. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-07-01OMAP: DSS2: OMAPFB: Add struct to store per-display dataTomi Valkeinen
Create a new struct omapfb_display_data to contain omapfb's private per-display data. Move the bpp override there. This struct will be used to hold auto/manual update state of a display in the following patches. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-12OMAP: DSS2: OMAPFB: Reduce stack usageTomi Valkeinen
omapfb_mode_to_timings() had struct fb_info, struct fb_var and struct fb_ops allocated from stack. This caused the stack usage grow quite high. Use kzalloc to allocate the structs instead. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-12OMAP: DSS2: OMAPFB: remove dead codeTomi Valkeinen
Remove old unused code lying inside #if 0. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11OMAP: DSS2: OMAPFB: Remove implicit display update on unblankJani Nikula
Currently omapfb does an implicit display update (for manual update displays) on unblank. There is no guarantee that the framebuffer contains a valid image when unblank is called. When using manual update displays it is the responsibility of the user space to update the display, and so it should be in this case also. This patch removes the implicit display update on unblank. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> [tomi.valkeinen@ti.com: improved description] Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11OMAP: DSS2: OMAPFB: Handle errors when initializing panelTomi Valkeinen
Errors from the panel driver were ignored during panel initialization. Handle the errors and fail accordingly. Also move the display initialization to a separate function to make it cleaner. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11OMAP: DSS2: Add method for querying display dimensions from DSS driversJani Nikula
Add get_dimensions() to struct omap_dss_driver. Use the call, if supported by the driver, in OMAPFB. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11OMAP: DSS2: Move display.h to include/video/Tomi Valkeinen
arch/arm/plat-omap/include/plat/display.h is an include for the OMAP DSS driver. A more logical place for it is in include/video. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-03-11OMAPFB: Adding a check for timings in set_def_modeJanorkar, Mayuresh
When omapfb.mode is passed through bootargs, when omapfb is setting mode, it would check if timings passed are fine for panel attached to it. It makes use of check_timing API provided by the panel. In current code if check_timing API is not available for attached panel, OMAPFB would return -EINVAL and BPP sent via bootargs will not have any effect. In case of panels like TAAL panel, omapfb or any other driver should not be allowed to change the timings. So bpps sent via bootargs will not have an effect. In such case we can check only the x_res and y_res with the panels resolution and if they match go ahead and set the bpps. The bpp value sent via bootarg would have an effect. Signed-off-by: Mayuresh Janorkar <mayur@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-01-10OMAP: DSS2: OMAPFB: Add null pointer checkSamreen
A null pointer check added. And using kstrdup() instead of kmalloc() & strcpy() Signed-off-by: Samreen <samreen@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-10-22OMAP: DSS2: OMAPFB: Allow usage of def_vrfb only for omap2,3Senthilvadivu Guruswamy
VRFB is supported only on OMAP2 and OMAP3 platforms. If VRFB rotation is not supported by the hardware and the user requests VRFB rotation, print a warning and ignore the request from the user. Signed-off-by: Senthilvadivu Guruswamy <svadivu@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-10-22OMAP: DSS2: OMAPFB: swap front and back porches for both hsync and vsyncTasslehoff Kjappfot
Framebuffer's left and right margins are relative to the active pixel area. Front and back porches are relative to the sync area. Left margin was wrongly assigned to front porch (and right to back), this patch fixes it. Signed-off-by: tasskjapp@gmail.com Reviewed-by: Russ.Dill@gmail.com Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-05OMAP: DSS2: OMAPFB: Fix invalid bpp for PAL and NTSC modesMaurus Cuelenaere
omapfb_mode_to_timings() sets the bpp to 0 when bootarg omapfb.mode is set to either "pal" or "ntsc". This patch corrects this by setting the bpp to 24, as would be done if omapdss_default_get_recommended_bpp() would be called. Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-05OMAP: DSS2: OMAPFB: Fix probe error pathAfzal Mohammed
Move sysfs entry creation to omapfb_probe() from omapfb_create_framebuffers(). This will make sure that sysfs entry is not left behind in case of unsuccessful probe due to failure in enabling fb0 of omapfb_create_framebuffers(). Signed-off-by: Afzal Mohammed <lazfamam@gmail.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-05OMAP: DSS2: OMAPFB: Remove redundant color register range checkJani Nikula
Unsigned regno can never be less than zero. Found by Coverity. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-05OMAP: DSS2: OMAPFB: Remove redundant rotate range checkJani Nikula
Unsigned rotate can never be less than zero. Found by Coverity. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-05OMAP: DSS2: OMAPFB: Check fb2display() return valueJani Nikula
Make sure NULL return value of fb2display() is not referenced. Found by Coverity. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>