| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
| |
Just as what the V4L2 PXP does, we should pass the drect
w/h and output w/h accroding to the rotation angle.
Signed-off-by: Fancy Fang <chen.fang@freescale.com>
(cherry picked from commit bf95e3ee4131ce3ee78050f098704588766e8b07)
|
|
|
|
|
|
|
|
|
|
| |
System will hang if calling fb_new_modelist() function from mxc_hdmi
driver.
In the function of fbcon_new_modelist(), pointer variable vc is missing
null pointer check, add null pointer check vc to fix the issue.
Signed-off-by: Sandor Yu <R01008@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Issue reproduce steps:
1. Boot up without HDMI cable plugin
2. Insert the HDMI cable.
3. echo mem > /sys/power/state , enter suspend,
4. resume it,
System can resume from suspend but display is blank.
Error log:
mxc_sdc_fb fb.31: Unable to allocate framebuffer memory
detected fb_set_par error, error code: -12
In mxc hdmi driver, if system bootup without hdmi cable plugin,
driver will create a default modelist.
In fbcon driver, array fb_display[] initialized when system bootup
and save current mode pointer that point to default modelist.
When hdmi cable is plugin the modelist will rebuild according edid
data, but the pointer of video mode in fb_display[] is not updated.
When system resume, fbcon will use the invalidate pointer to
configured framebuffer, framebuffer will crash.
Add function fb_new_modelist() after modelist is rebuild to fix the
issue.
Signed-off-by: Sandor Yu <R01008@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since commit 0bec46131d88 (ENGR00318063-8: ARM: imx6q: hide buggy
ldb_di_sel from clk API), the mux clock ldb_di_sel becomes unavailable
from the clock tree. The LDB driver sets up its pixel clock rate with
the help of ldb_di_sel knowledge, and thus causes problem. The net
result is the LDB pixel clock rate slows down to 50 MHz (50285714) from
the original 64 MHz (64653061) on imx6q.
The patch fixes the problem by removing the ldb_di_sel knowledge from
the clock configuration path and just setting the rate on div_sel[chno]
clock. The bonus point is that we can use chan.vm.pixelclock directly
instead of calculating the required rate we need to set on
ldb_di_sel_parent.
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
|
|
|
|
|
|
|
|
| |
Add dcic driver source code.
Support two instance dcic1 and dcic2.
Signed-off-by: Sandor Yu <R01008@freescale.com>
(cherry picked from commit 5dd90299f33e93252bd1cc7a9704adb9f469fa66)
|
|
|
|
|
|
|
|
| |
Check bpp value in check_var function, any other than bpp=32
and bpp=16 been setting to bpp=32.
Set default RGB888 format for lvds bpp=32 mode.
Signed-off-by: Sandor Yu <R01008@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following two commits for backlight core driver introduce
an usecount for each backlight device and on/off usage info of
each framebuffer associated with it so that we may enable/disable
a backlight device when necessary.
commit dcb7e61054b959dc4d601a96cce5cc85ad1568ef
commit b48b097319587422195adc3f8b2b3b0c067943cc
The problem is that some framebuffer drivers would enable their
display controllers in probe() and some backlight device drivers
would enable their backlights in probe() so that the backlight
device usecounts and the on/off usage info of framebuffers are
out of counting at the probing stage. This causes a backlight
cannot be disabled by blanking the relevant framebuffer(s) before
any fb unblanking operation, though it's quite reasonable for the
userland to unblank the framebuffer(s) before using it. In order
to avoid the potential unnecessary lighten backlight left behind
for the mxsfb driver, this patch unblanks framebuffer explicitly
in probe() since the LCDIF display controller is actually enabled
there.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit 61667ae1430849af17e2431bbe9290295e0ec492)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds a new 32bit RGB framebuffer pixel format support for
18bit display. The pixel format's components can be described by the
following table:
-----------------------------
| | length | offset |
-----------------------------
| red | 8bit | 16bit |
-----------------------------
| green | 8bit | 8bit |
-----------------------------
| blue | 8bit | 0 |
-----------------------------
| transp | 0 | N/A |
-----------------------------
Userland should specify each component's length and offset to use
this pixel format, otherwise the default 32bit pixel format which
can be described by the following table will be active:
-----------------------------
| | length | offset |
-----------------------------
| red | 6bit | 16bit |
-----------------------------
| green | 6bit | 8bit |
-----------------------------
| blue | 6bit | 0 |
-----------------------------
| transp | 0 | N/A |
-----------------------------
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
|
|
|
|
|
|
|
|
| |
Add a missing 'break' in the MXCFB_CSC_UPDATE case in mxcfb_ioctl(),
to prevent it to always return EINVAL (Invalid argument).
Acked-by: Liu Ying <Ying.Liu@freescale.com>
Signed-off-by: Julien Olivain <julien.olivain@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Split adjustment of the brightness (by changing the PWM duty cycle) from
the power on sequence. This fixes an issue where the brightness can no
longer be updated once the backlight has been enabled.
Reported-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Thierry Reding <treding@nvidia.com>
(cherry picked from commit e4bfeda96872bfe6015cd360008b77cd3b981b2b)
Conflicts:
drivers/video/backlight/pwm_bl.c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently the driver assumes that the values specified in the
brightness-levels device tree property increase as they are parsed from
left to right. But boards that invert the signal between the PWM output
and the backlight will need to specify decreasing brightness-levels.
This patch removes the assumption that the last element of the array is
the maximum value, and instead searches the array for the maximum value
and uses that in the duty cycle calculation.
Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
(cherry picked from commit 8f43e18e2769b3b28383903d501b4da29e388aad)
Conflicts:
drivers/video/backlight/pwm_bl.c
|
|
|
|
|
|
|
|
|
|
| |
Make use of the new enable_gpio field and allow it to be set from DT as
well. Now that all legacy users of platform data have been converted to
initialize this field to an invalid value, it is safe to use the field
from the driver.
Signed-off-by: Thierry Reding <treding@nvidia.com>
(cherry picked from commit 8265b2e4e62632b01f998095d1bbda4d281629fe)
|
|
|
|
|
|
|
|
|
|
| |
Follow up patches will add support for more complex means of powering
the backlight on and off such as using a regulator. To prevent calls to
the regulator API from becoming unbalanced, keep track of the enabled
state internally.
Signed-off-by: Thierry Reding <treding@nvidia.com>
(cherry picked from commit 97c38437115aa0c3fb2d50c488814b503ba529e0)
|
|
|
|
|
|
|
|
|
| |
In preparation for adding an optional regulator and enable GPIO to the
driver, split the power on and power off sequences into separate
functions to reduce code duplication at the multiple call sites.
Signed-off-by: Thierry Reding <treding@nvidia.com>
(cherry picked from commit 62b744a87c1170b339f993aa3cfb22465974816a)
|
|
|
|
|
|
|
|
| |
Add more blank lines to increase readability. While at it, remove a
trailing blank line at the end of the file.
Signed-off-by: Thierry Reding <treding@nvidia.com>
(cherry picked from commit 668e63c6701d486c68b49ffffc0e5b7de1a2e95c)
|
|
|
|
|
|
|
|
| |
eLCDIF did not support stride buffer, check the xres_virtual
in function mxfb_check_var, return false
if the value larger than xres.
Signed-off-by: Sandor Yu <R01008@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During hdmi hotplug test, there's a possibility that X-server unblanks
the frame buffer while HDMI-audio just gets the signal to start playback.
Then audio would get an unblanked state right before the playback and
bypassed the DMA enabling code. So this issue is caused by the race
between unblank and set_cable_state().
This patch sets the hdmi cable state a bit earilier so as to let audio
play first. If unblank happens later, the hdmi core and hdmi audio would
be robust enough to handle that case as long as it's not racing with the
other parts.
Acked-by: Sandor Yu <R01008@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
(cherry picked from commit 2917061c498a97e3c3b99ac616b6f3202f8a0499)
|
|
|
|
|
|
|
|
|
|
| |
In order to avoid any pixelation issue, we should disable a LVDS
channel before its relevant display controlled is enabled. This
patch adds logics to disable the LVDS channel in the setup()
callback which is invoked before the IPUv3 display controller is
disabled and re-enabled.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
|
|
|
|
|
|
|
| |
Set the correct permissions of the fsl_disp_property sysfs entry.
Acked-by: Liu Ying <Ying.Liu@freescale.com>
Signed-off-by: Julien Olivain <julien.olivain@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Multiple LCDIFs may be embedded in a SoC. A real example is the
i.MX6sx SoC. There are two LCDIFs embedded in it. In order to
distinguish bewteen multiple framebuffers based on different
LCDIFs, this patch adds devicetree alias index information to a
certain framebuffer's fix id. The fix id is in the 'mxs-lcdifx'
fashion. If there is no alias node defined for a lcdif node, the
fix id will be 'mxs-lcdif'.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A system based on a devicetree kernel may have multiple framebuffers
and each framebuffer has its own pwm backlight. A specific pwm backlight
should be enabled/disabled according to its framebuffer unblank/blank
events respectively. The backlight device's callback check_fb() is the
method the backlight core driver uses to determine if a backlight device
should respond to a certain framebuffer blank/unblank events or not.
This patch adds the callback check_fb() for the pwm backlight driver with
devicetree supported. Users should list every framebuffer name in the
string property fb-names of a pwm backlight devicetree node, otherwise,
the backlight device will respond to every framebuffer's blank/unblank
events in a system.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
xserver will read default video mode in command line by sysfs node
/sys/class/graphics/fb0/mode, but the sysfs node is not initialized
when system bootup without hdmi cable plugin
or frame buffer register in blank state.
Fixed:
- Remove unused previous_mode
- Add default_mode, initialize in disp_init function.
- Initialize fbi->mode in disp_init function and hdmi_setup function.
Signed-off-by: Sandor Yu <R01008@freescale.com>
|
|
|
|
|
|
|
|
|
| |
The mxc ipuv3 fb driver would report any display driver name that
it is trying to register. To suppress the report, this patch has
the driver provide the registered display driver name after register
finishes.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
|
|
|
|
|
|
|
| |
Since LCDIF may drive LDB, let's add FB_MXS to LDB Kconfig
dependency.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
|
|
|
|
|
|
|
| |
This patch adds mxc display driver support for the mxsfb
driver so that it may interactive with encoder drivers.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
|
|
|
|
|
|
|
| |
Since there is no encoder driver using the post_init
callback, let's drop it.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch almost reworks the LDB driver to make the
implementation simpler and clearer. The new version
should support all the LDB modules embedded in imx53,
imx6qdl and imx6sx. The lvds-channel subsidiary DT
node is introduced to represent each LVDS channel.
People may specify a channel's CRTC, working mode(dual
mode or split mode), data width, data mapping, display
timing and if it is a primary channel in the node.
Change logs:
* Use CTRC concept so that the driver may support both
IPU and LCDIF as the display engines.
* Add mxc dispdrv enable() callback.
* Cache LDB ctrl register value at probe()/setup()/
enable() stages and finally write to the register at
enable() stage.
* Simplify logics for setting ctrl/bus muxing/clocks.
* Use regmap to write crtl and bus muxing registers.
* Remove LDB description in DT binding doc fsl_ipuv3_fb.txt.
Instead, add a new one in fsl,ldb.txt.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds framebuffer info structure to the mxc display driver
enable/disable callback parameters so that the encoder drivers may
know the framebuffer information. In this way, the encoder drivers
which may deal with more than one framebuffer are able to figure out
the one it is handling. A real example is the LDB encoder, which may
deal with two standalone framebuffers at most.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
|
|
|
|
|
|
|
|
| |
The encoder drivers should decide if they need mode string for
initialization or not. So, we don't have to provide mode string
in the device tree node.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
| |
As the mxc display system is getting more and more complex, various
CRTCs(CRT controllers), such as IPUx DIy and LCDIFz, may drive
various encoders. For example, imx6sx/imx6dl LCDIF may drive LDB
while imx6dl IPU0 DI0/1 may drive LDB as well. This patch introduces
CRTC concept to the display framework so that the core logic could be
less IPU specific.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
|
|
|
|
|
|
|
|
|
|
| |
Refer to the RM:
Generally, 4 outstanding requests of length 16 will provide enough performance
to drive any standard display resolution. These configuration bits are intended
to change the access pattern of the eLCDIF to optimize system bus throughput
when other system masters will contend for system memory resources.
Signed-off-by: Robby Cai <R63905@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The display axi clock is a clock gating newly added on imx6sx.
It need to be enabled for lcdif/pxp/csi/pcie to work.
It should be set as a placeholder on other SoCs.
This patch also simplifies the sanity check for axi and pixel clock.
Signed-off-by: Sandor Yu <R01008@freescale.com>
Signed-off-by: Robby Cai <R63905@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For i.MX6 ARD board, the board not support read EDID from TV,
so HDMI driver will create a default support mode list when system
bootup.
Because yocto xserver can not get video mode information from
framebuffer now, and xserver will set default video mode XGA
to framebuffer, but XGA mode is not support by hdmi.
Remove XGA and SXGA from default support list.
HDMI driver will find a nearest match video mode in support list.
It is VGA mode. HDMI support VGA mode well.
Issue is fixed.
Signed-off-by: Sandor Yu <R01008@freescale.com>
|
|
|
|
|
|
|
|
|
| |
This patch adds Hannstar CABC driver support. The CABC
function turns the backlight density of a display panel
automatically according to the content shown on the panel.
It is controlled(enabled/disabled) by a GPIO.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
| |
When device boot into console, frame buffer failed to work after
suspend/resume.
That is caused by LCDIF IP lost all registers configuration
in suspend mode, and console didn't reconfiguration fb after resume.
Same issue didn't found with Yocto UI.
Reinitialize frame buffer driver after resume to fix the issue.
Signed-off-by: Sandor Yu <R01008@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The IPUv3 IDMAC has a bug to read 32bpp pixels from a
graphics plane whose alpha component is at the most
significant 8 bits. The bug only impacts on cases in which
the relevant separate alpha channel is enabled.
This patch adds check for the errata so that the bad
cases won't be triggered.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
|
|
|
|
|
|
| |
Add suspend/resume function to mxsfb driver.
Signed-off-by: Sandor Yu <R01008@freescale.com>
|
|
|
|
|
|
|
|
| |
Xserver will call pan display after fb blanked when device bootup.
mxsfb have prevent such operate.
Replace dev_err with dev_dbg to avoid message print.
Signed-off-by: Sandor Yu <R01008@freescale.com>
|
|
|
|
|
|
|
|
|
| |
Clean HDMI overflow bit need pixel clock on.
HDMI phy power state is align with pixel clock,
so move HDMI overflow bit mask/unmask code to
hdmi phy powerdown/powerup function.
Signed-off-by: Sandor Yu <R01008@freescale.com>
|
|
|
|
|
|
|
| |
Clean lcdif bus master bit when lcdif enter low power mode.
Restore the master bit when lcdif back to work mode.
Signed-off-by: Sandor Yu <R01008@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For mxsfb, the lcdif controller is enabled (with clock enabled as well)
at probe time, but pm_runtime_enable() is called after its enablement,
thus runtime pm function only works at next enablement. The root cause
is that pm_runtime_get_sync() function need to be called after
pm_runtime_enable(). This patch fixes the problem by moving the
position of pm_runtime_enable() ahead.
For epdc fb, runtime pm may not work at probe time if DEFAULT_PANEL_HW_INIT
is turned on (off by default). Fix it for safety.
Signed-off-by: Robby Cai <R63905@freescale.com>
|
|
|
|
|
|
| |
add runtime pm implementation for eLCDIF/EPDC/PxP
Signed-off-by: Robby Cai <R63905@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add interrupt handle thread for vsync and frame done irq.
- Support MXCFB_WAIT_FOR_VSYNC call to get vsync signal
in fb_ioctl function.
- Add flip_sem semaphore to check last frame done interrupt
in pan display function.
- Add cur_blank variable to record current blank state.
- Move register_framebuffer function after lcdif controller
enabled, struct of fb_info and lcdif controller should ready
to work before register_framebuffer.
Signed-off-by: Sandor Yu <R01008@freescale.com>
|
|
|
|
|
|
| |
Remove HDCP register access from HDMI driver.
Signed-off-by: Sandor Yu <R01008@freescale.com>
|
|
|
|
|
|
|
|
|
| |
Add GFP_KERNEL flag for dma_alloc_writecombine() and dma_alloc_coherent()
to make dma memory allocated via cma. Otherwise it's from dma pool whose
size is too small by default (256KB) and will cause allocation failure unless
use 'coherent_pool=xxM' in cmdline. We prefer cma now.
Signed-off-by: Robby Cai <R63905@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add sii902x hdmi chip driver.
- Sii902x initialized as I2C device.
- Support resolution change by application or FB command line.
- Max support resolution 1080p60.
- Support read EDID from hdmi sink.
- Support hdmi cable hotplug.
- Support default video mode read from dts.
Signed-off-by: Sandor Yu <R01008@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Original frame buffer size is fixed in SZ_2M when driver probing,
that can not support more resolution, such as 720p and 1080p.
Add function mxsfb_map_videomem/mxsfb_unmap_videomem to replace
fixed frame buffer size. Frame buffer size can change with resolution
change and application requirement.
- Add fb_mmap function implement.
- Remove member variable sync from struct mxsfb_info, align the sync
definition with mxc_cea_mode[] in mxc_edid.c.
- Set recovery from underflow bit.
- Fix xres_virtual yres_virtual check issue in function mxsfb_check_var().
Signed-off-by: Sandor Yu <R01008@freescale.com>
|
|
|
|
|
|
|
|
| |
Although now in 3.10 there's display timing dts framework but for epdc
driver there are other timing parameters besides the fb_videomode. It also
makes sense to move the timing parameters in epdc driver.
Signed-off-by: Robby Cai <R63905@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
merge the mach/epdc.h into linux/mxcfb_epdc.h
drop VM_RESERVED flag as deprecated.
drop VM_IO flag as it's automatically set in remap_pfn_range()
use <linux/platform_data/dma-imx.h> instead of <mach/dma.h>
use module_platform_driver()
add binding dts document for epdc fb driver
change the devname for interrupt from 'fb_dma' to 'epdc' to make it clear
Signed-off-by: Robby Cai <R63905@freescale.com>
|
|
|
|
|
|
|
|
|
| |
re-use the upstreaming mxsfb.c code.
- add the lcdif axi clock for register and dram access
- set the lcdif pix's parent as pll5_video to get most accurate pix clock
- add binding doc for lcdif dts
Signed-off-by: Robby Cai <R63905@freescale.com>
|