From: Afzal Mohammed <hidden> Date: 2013-01-22 16:52:19
Hi,
This series adds DT support to da8xx-fb driver (device found on
DaVinci and AM335x SoC's). It does certain cleanup's in the process.
This series as compared to previous version handles configuration of
the LCDC clock rate by modelling as a clock divider of CCF. This would
take effect only if CCF is selected, if not, no change to existing
method.
This makes use of Steffen Trumtrar's v16 of display timing DT support.
Testing has been done on AM335x SoC based boards like AM335x EVM. It
has also been verified that display on DA850 EVM (non-DT boot) works
as earlier.
This series is based on v3.8-rc3,
and is dependent on,
1. Series v16 "of: add display helper" by,
Steffen Trumtrar [off-list ref]
2. Patch "da8xx: Allow use by am33xx based devices" by,
Pantelis Antoniou [off-list ref]
3. Series v3 "video: da8xx-fb: runtime timing configuration" by,
me (Afzal Mohammed [off-list ref])
To test this series on AM335x based boards,
1. Series v2 "ARM: dts: AM33XX: lcdc support" by,
me (Afzal Mohammed [off-list ref]),
2. Series "HWMOD fixes for AM33xx PWM submodules and device tree nodes" by,
Philip, Avinash [off-list ref]
3. Series "clk: divider: prepare for minimum divider" by,
me (Afzal Mohammed [off-list ref]),
4. Series "ARM: AM335x: LCDC platform support" by,
me (Afzal Mohammed [off-list ref]),
would be needed.
All above dependencies along with those required for testing is available
@ git://gitorious.org/x0148406-public/linux-kernel.git tags/da8xx-fb-dt-v3
Regards
Afzal
v3: model CCF clock divider with parent propogation if CCF selected
v2: 2 new patches - one to configure clock rate properly (12/12)and
other to make io operations safe (1/12)
Afzal Mohammed (11):
video: da8xx-fb: make io operations safe
video: da8xx-fb: enable sync lost intr for v2 ip
video: da8xx-fb: use devres
video: da8xx-fb: ensure non-null cfg in pdata
video: da8xx-fb: reorganize panel detection
video: da8xx-fb: minimal dt support
video: da8xx-fb: invoke platform callback safely
video: da8xx-fb: obtain fb_videomode info from dt
video: da8xx-fb: ensure pdata only for non-dt
video: da8xx-fb: setup struct lcd_ctrl_config for dt
video: da8xx-fb: CCF clock divider handling
Manjunathappa, Prakash (1):
video: da8xx-fb: fix 24bpp raster configuration
.../devicetree/bindings/video/fb-da8xx.txt | 37 ++++
drivers/video/da8xx-fb.c | 217 ++++++++++++++++-----
2 files changed, 201 insertions(+), 53 deletions(-)
create mode 100644 Documentation/devicetree/bindings/video/fb-da8xx.txt
--
1.7.12
From: Afzal Mohammed <hidden> Date: 2013-01-22 16:52:31
From: "Manjunathappa, Prakash" <redacted>
Set only LCD_V2_TFT_24BPP_MODE bit for 24bpp and LCD_V2_TFT_24BPP_UNPACK
bit along with LCD_V2_TFT_24BPP_MODE for 32bpp configuration.
Patch is tested on am335x-evm for 24bpp and da850-evm for 16bpp
configurations.
Signed-off-by: Manjunathappa, Prakash <redacted>
Signed-off-by: Afzal Mohammed <redacted>
---
drivers/video/da8xx-fb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -1036,12 +1036,9 @@ static int fb_remove(struct platform_device *dev)par->p_palette_base);dma_free_coherent(NULL,par->vram_size,par->vram_virt,par->vram_phys);-free_irq(par->irq,par);pm_runtime_put_sync(&dev->dev);pm_runtime_disable(&dev->dev);framebuffer_release(info);-iounmap(da8xx_fb_reg_base);-release_mem_region(lcdc_regs->start,resource_size(lcdc_regs));}return0;
@@ -1265,7 +1262,6 @@ static int fb_probe(struct platform_device *device)structfb_info*da8xx_fb_info;structclk*fb_clk=NULL;structda8xx_fb_par*par;-resource_size_tlen;intret,i;unsignedlongulcm;
@@ -1275,29 +1271,16 @@ static int fb_probe(struct platform_device *device)}lcdc_regs=platform_get_resource(device,IORESOURCE_MEM,0);-if(!lcdc_regs){-dev_err(&device->dev,-"Can not get memory resource for LCD controller\n");-return-ENOENT;-}--len=resource_size(lcdc_regs);--lcdc_regs=request_mem_region(lcdc_regs->start,len,lcdc_regs->name);-if(!lcdc_regs)-return-EBUSY;--da8xx_fb_reg_base=ioremap(lcdc_regs->start,len);+da8xx_fb_reg_base=devm_request_and_ioremap(&device->dev,lcdc_regs);if(!da8xx_fb_reg_base){-ret=-EBUSY;-gotoerr_request_mem;+dev_err(&device->dev,"memory resource setup failed\n");+return-EADDRNOTAVAIL;}-fb_clk=clk_get(&device->dev,"fck");+fb_clk=devm_clk_get(&device->dev,"fck");if(IS_ERR(fb_clk)){dev_err(&device->dev,"Can not get device clock\n");-ret=-ENODEV;-gotoerr_ioremap;+return-ENODEV;}pm_runtime_enable(&device->dev);
@@ -1458,7 +1441,7 @@ static int fb_probe(struct platform_device *device)lcdc_irq_handler=lcdc_irq_handler_rev02;}-ret=request_irq(par->irq,lcdc_irq_handler,0,+ret=devm_request_irq(&device->dev,par->irq,lcdc_irq_handler,0,DRIVER_NAME,par);if(ret)gotoirq_freq;
From: Afzal Mohammed <hidden> Date: 2013-01-22 16:52:50
Move panel detection to a separate function, this helps in readability
as well as makes DT support cleaner.
Signed-off-by: Afzal Mohammed <redacted>
---
drivers/video/da8xx-fb.c | 42 ++++++++++++++++++++++++++----------------
1 file changed, 26 insertions(+), 16 deletions(-)
From: Afzal Mohammed <hidden> Date: 2013-01-22 16:53:00
Driver is provided a means to have the probe triggered by DT.
Signed-off-by: Afzal Mohammed <redacted>
---
Documentation/devicetree/bindings/video/fb-da8xx.txt | 16 ++++++++++++++++
drivers/video/da8xx-fb.c | 7 +++++++
2 files changed, 23 insertions(+)
create mode 100644 Documentation/devicetree/bindings/video/fb-da8xx.txt
From: Afzal Mohammed <hidden> Date: 2013-01-22 16:53:06
Ensure that platform data is present before checking whether platform
callback is present (the one used to control backlight). So far this
was not an issue as driver was purely non-DT triggered, but now DT
support has been added.
Signed-off-by: Afzal Mohammed <redacted>
---
drivers/video/da8xx-fb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -6,6 +6,12 @@ Required properties: AM335x SoC's - "ti,am3352-lcdc", "ti,da830-lcdc" - reg: Address range of lcdc register set - interrupts: lcdc interrupt+- display-timings: typical videomode of lcd panel, represented as child.+ Refer Documentation/devicetree/bindings/video/display-timing.txt for+ display timing binding details. If multiple videomodes are mentioned+ in display timings node, typical videomode has to be mentioned as the+ native mode or it has to be first child (driver cares only for native+ videomode). Example:
From: Afzal Mohammed <hidden> Date: 2013-01-22 16:53:18
This driver is DT probe-able, hence ensure presence of platform data
only for non-DT boot.
Signed-off-by: Afzal Mohammed <redacted>
---
drivers/video/da8xx-fb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -1303,7 +1303,7 @@ static int fb_probe(struct platform_device *device)intret;unsignedlongulcm;-if(fb_pdata=NULL){+if(fb_pdata=NULL&&!device->dev.of_node){dev_err(&device->dev,"Can not get platform data\n");return-ENOENT;}
From: Afzal Mohammed <hidden> Date: 2013-01-22 16:53:30
Common clock framework provides a basic clock divider. Make use of it
to handle clock configuration in the LCDC IP, wherever applicable;
out of two platforms having this IP, only am335x is converted to use
CCF, DaVinci is not yet converted. Hence wrap the modification such
that it will come into effect only if CCF is selected, otherwise,
prgram dividers as earlier. Once DaVinci is converted to use CCF,
this ifdef'ery can be removed.
Divider clock instantiated is made as a one that allows the rate
propogation to it's parent, that provides more options w.r.t pixel
clock rates that could be configured.
Signed-off-by: Afzal Mohammed <redacted>
---
v3: model CCF clock divider with parent propogation if CCF selected
v2: new patch
drivers/video/da8xx-fb.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 65 insertions(+), 2 deletions(-)
From: Afzal Mohammed <hidden> Date: 2013-01-22 16:53:31
strcut lcd_ctrl_config information required for driver is currently
obtained via platform data. To handle DT probing, create
lcd_ctrl_config and populate it with default values, these values are
sufficient for the panels so far used with this controller to work.
Signed-off-by: Afzal Mohammed <redacted>
---
drivers/video/da8xx-fb.c | 34 +++++++++++++++++++++++++++++++++-
1 file changed, 33 insertions(+), 1 deletion(-)
From: Afzal Mohammed <hidden> Date: 2013-01-22 16:56:20
interrupt handler is checking for sync lost interrupt, but it was not
enabled, enable it.
Signed-off-by: Afzal Mohammed <redacted>
---
drivers/video/da8xx-fb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Op 22 jan. 2013, om 17:51 heeft Afzal Mohammed [off-list ref] het volgende geschreven:
Hi,
This series adds DT support to da8xx-fb driver (device found on
DaVinci and AM335x SoC's). It does certain cleanup's in the process.
This series as compared to previous version handles configuration of
the LCDC clock rate by modelling as a clock divider of CCF. This would
take effect only if CCF is selected, if not, no change to existing
method.
This makes use of Steffen Trumtrar's v16 of display timing DT support.
Wouldn't it be better to delete da8xx-fb.* and switch to Rob Clarks DRM based driver for this IP block?
regards,
Koen
From: Rob Clark <hidden> Date: 2013-01-22 18:45:13
On Tue, Jan 22, 2013 at 11:03 AM, Koen Kooi [off-list ref] wrote:
Op 22 jan. 2013, om 17:51 heeft Afzal Mohammed [off-list ref] het volgende geschreven:
quoted
Hi,
This series adds DT support to da8xx-fb driver (device found on
DaVinci and AM335x SoC's). It does certain cleanup's in the process.
This series as compared to previous version handles configuration of
the LCDC clock rate by modelling as a clock divider of CCF. This would
take effect only if CCF is selected, if not, no change to existing
method.
This makes use of Steffen Trumtrar's v16 of display timing DT support.
Wouldn't it be better to delete da8xx-fb.* and switch to Rob Clarks DRM based driver for this IP block?
we probably can't delete da8xx-fb, but I think it would be ok to only
use it for legacy platforms not yet ported to DT.
BR,
-R
regards,
Koen--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Rob Clark <hidden> Date: 2013-01-23 14:25:49
On Wed, Jan 23, 2013 at 6:27 AM, Mohammed, Afzal [off-list ref] wrote:
Hi,
On Wed, Jan 23, 2013 at 00:15:09, Rob Clark wrote:
quoted
quoted
Wouldn't it be better to delete da8xx-fb.* and switch to Rob Clarks DRM based driver for this IP block?
quoted
we probably can't delete da8xx-fb, but I think it would be ok to only
use it for legacy platforms not yet ported to DT.
We can't remove da8xx-fb as DA830 is a non-DT one and DA850 is only gaining
DT support.
And Rob,
I am not familiar with drm setup, would all the user space frame buffer based
applications work as is with drm driver?
drm does provide a legacy fbdev interface (needed for fbcon, for
example). I don't think da8xx-fb has any custom ioctls, so probably
what drm provides should be enough.
BR,
-R