* Re: [PATCH] fbmem: fix race condition between
From: Bruno Prémont @ 2011-05-25 18:57 UTC (permalink / raw)
To: Fabio Erculiani; +Cc: linux-fbdev, lethal, linux-kernel
In-Reply-To: <BANLkTi=207-bVi3pnOWk7zG61u4=YU4GFg@mail.gmail.com>
On Wed, 25 May 2011 Fabio Erculiani <lxnay@sabayon.org> wrote:
> On Wed, May 25, 2011 at 8:46 PM, Bruno Prémont wrote:
> > On Wed, 25 May 2011 Fabio Erculiani <lxnay@sabayon.org> wrote:
> >> I'm not a fbdev expert. So I leave the real fix to real men ( ;-) ).
> >> It is causing deadlock during boot, so I would consider it quite critical.
> >> Users using any fb driver will get into troubles.
> >> The workaround is to boot with vga=normal.
> >
> > What is your system doing during boot? I've never seen it here but maybe
> > my boot sequence is too simple.
>
> I'm using vesafb and vgay1. It is quite simple to reproduce.
> Also see: http://bugs.gentoo.org/show_bug.cgi?id68109
Looks like gentoo kernel, might be splash is related to the hang
> > Could you tell if it deadlocks before init gets started or afterwards,
> > which fb drivers (and extra kernel patches if any) are in use.
>
> Exactly when register_framebuffer() is called, in my case, early in
> the boot phase, before init.
>
> >
> > If you have the complete backtrace of the deadlocked processes it would
> > help getting a better idea of what is affected and how (and why just the
> > framebuffer's lock is not causing trouble with earlier kernel versions).
>
> Because that code got a HUGE rewrite in the latest cycle, where
> registration_lock has been introduce.
> Just make a diff between 2.6.38 and 2.6.39. It will be easy to see
> that SO MANY lines have changed ;-)
> Anyway, since I'm out of office these days, I won't be able to send
> you the traceback this week, but since so many people have run into
> it, I guess it's fairly simple to reproduce.
Rewrite was not so huge, and I'm not affected here (running with KMS
compiled in though and vanilla kernel).
Probably the cause is related to one of the extra patches provided by
Gentoo and subscribing to framebuffer registration notifications.
Will have a look.
Bruno
^ permalink raw reply
* Re: efifb not detected on Intel DQ67SW
From: Andrew Lutomirski @ 2011-05-25 18:54 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <BANLkTikxX577VKmPRVGcp_Chj-udCf-KaQ@mail.gmail.com>
On Wed, May 25, 2011 at 2:32 PM, Matthew Garrett <mjg@redhat.com> wrote:
> On Wed, May 25, 2011 at 02:21:17PM -0400, Andrew Lutomirski wrote:
>
>> Looking at the code, I'm a little confused how it's supposed to work.
>> AFAICT, unless there's a DMI match, then the driver will only load
>> ifthe boot code sets VIDEO_TYPE_EFI, but nothing sets that.
>
> grub should be setting that.
It looks like grub-fedora (the git version, anyway) has a function
set_kernel_params that tries to do this. Peter, the git tree claims
that you maintain it. Are there any experiments you'd like me to do?
(Dumping boot_params, perhaps?)
--Andy
^ permalink raw reply
* Re: [PATCH] fbmem: fix race condition between register_framebuffer()
From: Fabio Erculiani @ 2011-05-25 18:53 UTC (permalink / raw)
To: Bruno Prémont; +Cc: Anca Emanuel, linux-fbdev, lethal, linux-kernel
In-Reply-To: <20110525205105.03e2d911@neptune.home>
On Wed, May 25, 2011 at 8:51 PM, Bruno Prémont
<bonbons@linux-vserver.org> wrote:
>
> Your patch was against 2.6.39 or shortly before as Linus's code
> did introduce the do_ variants of register/unregister/conflict functions.
>
> Bruno
>
I made that patch against the 2.6.39 tag.
Git ain't lying ;-)
--
Fabio Erculiani
^ permalink raw reply
* Re: [PATCH] fbmem: fix race condition between register_framebuffer()
From: Fabio Erculiani @ 2011-05-25 18:52 UTC (permalink / raw)
To: Bruno Prémont; +Cc: linux-fbdev, lethal, linux-kernel
In-Reply-To: <20110525204648.58983270@neptune.home>
On Wed, May 25, 2011 at 8:46 PM, Bruno Prémont
<bonbons@linux-vserver.org> wrote:
> On Wed, 25 May 2011 Fabio Erculiani <lxnay@sabayon.org> wrote:
>> I'm not a fbdev expert. So I leave the real fix to real men ( ;-) ).
>> It is causing deadlock during boot, so I would consider it quite critical.
>> Users using any fb driver will get into troubles.
>> The workaround is to boot with vga=normal.
>
> What is your system doing during boot? I've never seen it here but maybe
> my boot sequence is too simple.
I'm using vesafb and vgay1. It is quite simple to reproduce.
Also see: http://bugs.gentoo.org/show_bug.cgi?id68109
>
> Could you tell if it deadlocks before init gets started or afterwards,
> which fb drivers (and extra kernel patches if any) are in use.
Exactly when register_framebuffer() is called, in my case, early in
the boot phase, before init.
>
> If you have the complete backtrace of the deadlocked processes it would
> help getting a better idea of what is affected and how (and why just the
> framebuffer's lock is not causing trouble with earlier kernel versions).
Because that code got a HUGE rewrite in the latest cycle, where
registration_lock has been introduce.
Just make a diff between 2.6.38 and 2.6.39. It will be easy to see
that SO MANY lines have changed ;-)
Anyway, since I'm out of office these days, I won't be able to send
you the traceback this week, but since so many people have run into
it, I guess it's fairly simple to reproduce.
>
> Bruno
>
>
>> Cheers,
>
--
Fabio Erculiani
^ permalink raw reply
* Re: [PATCH] fbmem: fix race condition between
From: Bruno Prémont @ 2011-05-25 18:51 UTC (permalink / raw)
To: Fabio Erculiani; +Cc: Anca Emanuel, linux-fbdev, lethal, linux-kernel
In-Reply-To: <BANLkTikk2BbOWHQN+UPWD71QoM6g-QpHZg@mail.gmail.com>
On Wed, 25 May 2011 Fabio Erculiani <lxnay@sabayon.org> wrote:
> On Wed, May 25, 2011 at 8:41 PM, Anca Emanuel <anca.emanuel@gmail.com> wrote:
> >
> > Did you test 2.6.39 ? The fix from Linus is not ok ?
> >
>
> Sorry, maybe I missed it?
Your patch was against 2.6.39 or shortly before as Linus's code
did introduce the do_ variants of register/unregister/conflict functions.
Bruno
^ permalink raw reply
* Re: [PATCH] fbmem: fix race condition between register_framebuffer()
From: Fabio Erculiani @ 2011-05-25 18:48 UTC (permalink / raw)
To: Anca Emanuel; +Cc: Bruno Prémont, linux-fbdev, lethal, linux-kernel
In-Reply-To: <BANLkTi=Q5EzN+wP9jDNCxCnZBQ0XHOmOhQ@mail.gmail.com>
On Wed, May 25, 2011 at 8:41 PM, Anca Emanuel <anca.emanuel@gmail.com> wrote:
>
> Did you test 2.6.39 ? The fix from Linus is not ok ?
>
Sorry, maybe I missed it?
--
Fabio Erculiani
^ permalink raw reply
* Re: [PATCH] fbmem: fix race condition between
From: Bruno Prémont @ 2011-05-25 18:46 UTC (permalink / raw)
To: Fabio Erculiani; +Cc: linux-fbdev, lethal, linux-kernel
In-Reply-To: <BANLkTimxi-LZFzwv=z6RRBCX098hr-ViUg@mail.gmail.com>
On Wed, 25 May 2011 Fabio Erculiani <lxnay@sabayon.org> wrote:
> I'm not a fbdev expert. So I leave the real fix to real men ( ;-) ).
> It is causing deadlock during boot, so I would consider it quite critical.
> Users using any fb driver will get into troubles.
> The workaround is to boot with vga=normal.
What is your system doing during boot? I've never seen it here but maybe
my boot sequence is too simple.
Could you tell if it deadlocks before init gets started or afterwards,
which fb drivers (and extra kernel patches if any) are in use.
If you have the complete backtrace of the deadlocked processes it would
help getting a better idea of what is affected and how (and why just the
framebuffer's lock is not causing trouble with earlier kernel versions).
Bruno
> Cheers,
^ permalink raw reply
* Re: [PATCH] fbmem: fix race condition between register_framebuffer()
From: Anca Emanuel @ 2011-05-25 18:41 UTC (permalink / raw)
To: Fabio Erculiani; +Cc: Bruno Prémont, linux-fbdev, lethal, linux-kernel
In-Reply-To: <BANLkTimxi-LZFzwv=z6RRBCX098hr-ViUg@mail.gmail.com>
On Wed, May 25, 2011 at 9:17 PM, Fabio Erculiani <lxnay@sabayon.org> wrote:
> I'm not a fbdev expert. So I leave the real fix to real men ( ;-) ).
> It is causing deadlock during boot, so I would consider it quite critical.
> Users using any fb driver will get into troubles.
> The workaround is to boot with vga=normal.
Did you test 2.6.39 ? The fix from Linus is not ok ?
^ permalink raw reply
* Re: efifb not detected on Intel DQ67SW
From: Matthew Garrett @ 2011-05-25 18:32 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <BANLkTikxX577VKmPRVGcp_Chj-udCf-KaQ@mail.gmail.com>
On Wed, May 25, 2011 at 02:21:17PM -0400, Andrew Lutomirski wrote:
> Looking at the code, I'm a little confused how it's supposed to work.
> AFAICT, unless there's a DMI match, then the driver will only load
> ifthe boot code sets VIDEO_TYPE_EFI, but nothing sets that.
grub should be setting that.
> Should there be something that looks at
> EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE to find the frame buffer? (Does
> that not work on Apple machines?)
By the time we get into the kernel we've called ExitBootServices(), so
at that point we can't do anything with GOP. grub should have grabbed
that information and stashed it in the appropriate field.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply
* efifb not detected on Intel DQ67SW
From: Andrew Lutomirski @ 2011-05-25 18:21 UTC (permalink / raw)
To: linux-fbdev
Hi-
For mostly masochistic reasons, I boot my DQ67SW box in UEFI mode.
efifb doesn't detect the anything, so I have no console until i915
loads.
Looking at the code, I'm a little confused how it's supposed to work.
AFAICT, unless there's a DMI match, then the driver will only load
ifthe boot code sets VIDEO_TYPE_EFI, but nothing sets that.
Should there be something that looks at
EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE to find the frame buffer? (Does
that not work on Apple machines?)
--Andy
^ permalink raw reply
* Re: [PATCH] fbmem: fix race condition between register_framebuffer()
From: Fabio Erculiani @ 2011-05-25 18:17 UTC (permalink / raw)
To: Bruno Prémont; +Cc: linux-fbdev, lethal, linux-kernel
In-Reply-To: <20110525181917.12cf97b8@neptune.home>
I'm not a fbdev expert. So I leave the real fix to real men ( ;-) ).
It is causing deadlock during boot, so I would consider it quite critical.
Users using any fb driver will get into troubles.
The workaround is to boot with vga=normal.
Cheers,
--
Fabio Erculiani
^ permalink raw reply
* Re: [PATCH] fbmem: fix race condition between
From: Bruno Prémont @ 2011-05-25 16:19 UTC (permalink / raw)
To: Fabio Erculiani; +Cc: linux-fbdev, lethal, linux-kernel
In-Reply-To: <20110524224545.08c53b1d@neptune.home>
On Tue, 24 May 2011 Bruno Prémont <bonbons@linux-vserver.org> wrote:
> On Tue, 24 May 2011 Fabio Erculiani <lxnay@sabayon.org> wrote:
> > register_framebuffer() acquires registration_lock, then calls
> > do_register_framebuffer() which calls fb_notifier_call_chain()
> > which calls fb_open() which calls get_fb_info() which tries
> > (at last) to acquire registration_lock again.
> > This is a workaround.
>
> What calls fb_open() instead of just calling fb_info->fbops->fb_open
> when it is set?
> In other words what kernel handler of fb_notifier chain does file-based
> open of the framebuffer or is the event pushed out synchronously to
> userspace?
Note that fb_info->lock is also taken on both sides:
- per definition around all fb_notifier_call_chain() calls
- as well in fb_open() to protect fb_info->fb_ops->fb_open call.
Bruno
> > Signed-off-by: Fabio Erculiani <lxnay@sabayon.org>
> > ---
> > drivers/video/fbmem.c | 13 ++++++++++++-
> > 1 files changed, 12 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
> > index 5aac00e..b9831a0 100644
> > --- a/drivers/video/fbmem.c
> > +++ b/drivers/video/fbmem.c
> > @@ -1628,6 +1628,11 @@ static int do_register_framebuffer(struct fb_info *fb_info)
> > event.info = fb_info;
> > if (!lock_fb_info(fb_info))
> > return -ENODEV;
> > +
> > + /* FIXME: unlock registration mutex before registration
> > + * notification is sent, in order to avoid deadlock.
> > + */
> > + mutex_unlock(®istration_lock);
> > fb_notifier_call_chain(FB_EVENT_FB_REGISTERED, &event);
> > unlock_fb_info(fb_info);
> > return 0;
> > @@ -1692,7 +1697,13 @@ register_framebuffer(struct fb_info *fb_info)
> >
> > mutex_lock(®istration_lock);
> > ret = do_register_framebuffer(fb_info);
> > - mutex_unlock(®istration_lock);
> > + if (ret != 0)
> > + /*
> > + * FIXME: mutex is unlocked only if ret = 0.
> > + * This is the second part of the workaround
> > + * that prevents deadlocking.
> > + */
> > + mutex_unlock(®istration_lock);
> >
> > return ret;
> > }
^ permalink raw reply
* Re: [PATCH] viafb: use display information in info not in var for panning
From: Laurent Pinchart @ 2011-05-25 9:41 UTC (permalink / raw)
To: Florian Tobias Schandinat; +Cc: linux-fbdev, linux-kernel, stable
In-Reply-To: <1306188446-5160-1-git-send-email-FlorianSchandinat@gmx.de>
Hi Florian,
On Tuesday 24 May 2011 00:07:26 Florian Tobias Schandinat wrote:
> As Laurent pointed out we must not use any information in the passed
> var besides xoffset, yoffset and vmode as otherwise applications
> might abuse it. Also use the aligned fix.line_length and not the
> (possible) unaligned xres_virtual.
>
> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
> Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: stable@kernel.org
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/video/via/viafbdev.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c
> index 3114a87..aa87529 100644
> --- a/drivers/video/via/viafbdev.c
> +++ b/drivers/video/via/viafbdev.c
> @@ -348,8 +348,9 @@ static int viafb_pan_display(struct fb_var_screeninfo
> *var, struct fb_info *info)
> {
> struct viafb_par *viapar = info->par;
> - u32 vram_addr = (var->yoffset * var->xres_virtual + var->xoffset)
> - * (var->bits_per_pixel / 8) + viapar->vram_addr;
> + u32 vram_addr = viapar->vram_addr
> + + var->yoffset * info->fix.line_length
> + + var->xoffset * info->var.bits_per_pixel / 8;
>
> DEBUG_MSG(KERN_DEBUG "viafb_pan_display, address = %d\n", vram_addr);
> if (!viafb_dual_fb) {
--
Regards,
Laurent Pinchart
^ permalink raw reply
* [GIT PULL] fbdev updates for 2.6.40-rc1
From: Paul Mundt @ 2011-05-25 8:09 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-fbdev, linux-kernel
Please pull from:
master.kernel.org:/pub/scm/linux/kernel/git/lethal/fbdev-2.6.git
Which contains:
Amber Jain (5):
OMAP: DSS2: Add new color formats for OMAP4
OMAP: DSS2: Ensure non-zero FIR values are configured
OMAP: DSS2: Use for loop where ever possible in SR(), RR()
OMAP: DSS2: Add new registers for NV12 support
OMAP: DSS2: Add support for NV12 format
Anatolij Gustschin (5):
video: mb862xxfb: correct fix.smem_len field initialization
video: mb862xxfb: use pre-initialized configuration for PCI GDCs
video: mb862xxfb: relocate register space to get contiguous vram
video: mb862xx: add support for controller's I2C bus adapter
video: mb862xxfb: add support for L1 displaying
Archit Taneja (24):
OMAP: DSS2: Fix: Return correct lcd clock source for OMAP2/3
OMAP: DSS2: Fix: Return correct lcd clock source for OMAP2/3
OMAP4: DSS2: Register configuration changes for DSI
OMAP: DSS2: DSI: Introduce sync_vc functions
OMAP2PLUS: DSS2: Change enum "dss_clk_source" to "omap_dss_clk_source"
OMAP2PLUS: DSS2: Add clock sources to dss device clock configuration
OMAP: DSS2: HDMI: Use dss_device clock configuration for HDMI PLL parameters
OMAP2PLUS: DSS2: Remove hack config "CONFIG_OMAP2_DSS_USE_DSI_PLL"
OMAP2PLUS: DSS2: Clean up omap_display_init()
OMAP: DSS2: DSI: enable scp clock in dsi_dump_regs()
OMAP: DSS2: Clean up DISPC overlay register definitions
OMAP: DSS2: Clean up DISPC overlay manager register definitions
OMAP: DSS2: Remove usage of struct dispc_reg
OMAP: DSS2: DSI: Add extra omap_dss_device argument in functions exported by dsi
OMAP: DSS2: Remove omap_dss_device argument from dsi_pll_init()
OMAP: DSS2: Pass platform_device as an argument in dsi functions
OMAP: DSS2: DSI: Use platform_device pointer to get dsi data
OMAP: DSS2: DSI: Pass pointer to struct to packet_sent_handler isrs
OMAP4: DSS2: DSI: Changes for DSI2 on OMAP4
OMAP: DSS2: Taal: Use device name in backlight_device_register
OMAP: DSS2: DSI: Remove DISPC pixel clock related info in dsi_dump_clocks()
OMAP: DSS2: DSI: Use system workqueue for delayed work instead of a private workqueue
OMAP: DSS2: DSI: Get number of DSI data lanes using DSI_GNQ register
OMAP: DSS2: DSI: Get line buffer size from DSI_GNQ register
Axel Lin (1):
video: da8xx-fb: fix section mismatch warning
Ben Hutchings (1):
video: mb862xxfb: Require either FB_MB862XX_PCI_GDC or FB_MB862XX_LIME
Damian (3):
sh_mobile_meram: MERAM framework for LCDC
sh_mobile_meram: Add support for NV24 framebuffers
sh_mobile_meram: Safely disable MERAM operation when not initialized
Enric Balletbo i Serra (2):
OMAP: DSS2: Support for Seiko 70WVW1TZ3
OMAP: DSS2: Support for Powertip PH480272T
Geert Uytterhoeven (3):
fbdev/amifb: Correct check for video memory size
fbdev/amifb: Do not call panic() if there's not enough Chip RAM
fbdev/amifb: Remove superfluous alignment of frame buffer memory
Guennadi Liakhovetski (3):
fbdev: sh_mobile_hdmi: runtime suspend HDMI on error and clean up paths
fbdev: sh_mobile_lcdc: reduce scope of a variable
fbdev: sh_mobile_lcdc: remove runtime PM calls from the notifier
Jani Nikula (2):
OMAP: DSS2: Add method for querying display dimensions from DSS drivers
OMAP: DSS2: OMAPFB: Remove implicit display update on unblank
Jingoo Han (7):
video: s3c-fb: make runtime pm functions static
video: s3c-fb: add spinlock to interrupt routine
video: s3c-fb: correct window osd size offset values
video: s3c-fb: add additional validate bpps
video: s3c-fb: add window variant information for S5P
video: s3c-fb: add gpio setup function to resume function
video: s3c-fb: correct transparency checking in 32bpp
Julia Lawall (3):
drivers/video: Convert release_resource to release_mem_region
drivers/video/sm501fb.c: Convert release_resource to release_mem_region
drivers/video/s3c2410fb.c: Convert release_resource to release_mem_region
Konstantin Khlebnikov (1):
efifb: fix int to pointer cast warning
Liu Yuan (1):
video, udlfb: Fix two build warnings about 'ignoring return value'
Mike Frysinger (1):
OMAP2: avoid descending into disabled framebuffer dirs
Niels de Vos (1):
OMAP: DSS2: OMAPFB: make DBG() more resistant in if-else constructions
Ondrej Zary (1):
s3fb: add DDC support
Paul Mundt (1):
s3fb: fix up DDC build with MTRR disabled.
Ricardo Neri (5):
OMAP4: DSS2: Create a DSS features structure for OMAP4430 ES1.0
OMAP4: DSS2: HDMI: Add DSS feature for CTS calculation
OMAP4: DSS2: HDMI: Add enums and structures for audio
OMAP4: DSS2: HDMI: Add functionality for audio configuration
OMAP4: DSS2: HDMI: Implement ASoC Codec driver for HDMI audio
Stephen Rothwell (1):
udlfb: include prefetch.h explicitly
Tomi Valkeinen (52):
OMAP: DSS2: DSI: fix use_sys_clk & highfreq
OMAP: DSS2: DSI: fix dsi_dump_clocks()
OMAP: DSS2: DSI: Fix DSI PLL power bug
OMAP: DSS2: fix panel Kconfig dependencies
OMAP: DSS2: Move display.h to include/video/
OMAP: DSS2: Move panel-generic-dpi.h to include/video/
OMAP: DSS2: Move nokia-dsi-panel.h to include/video/
OMAP: DSS2: DSI: fix use_sys_clk & highfreq
OMAP: DSS2: DSI: fix dsi_dump_clocks()
OMAP: DSS2: DSI: Fix DSI PLL power bug
OMAP: DSS2: fix panel Kconfig dependencies
OMAP: DSS2: move dss device clock configuration
OMAP: DSS2: remove non-working msleep(40) workaround
OMAP: DSS2: make 50ms bug-fix sleep optional
OMAP: DSS2: VENC: make 20ms venc bug-fix sleep optional
OMAP: DSS2: VENC: Remove sleeps at venc enable/disable
OMAP: DSS2: OMAPFB: Handle errors when initializing panel
OMAP: DSS2: VENC: Add missing start/stop_device calls
OMAP: DSS2: make omap_dss_(un)register_device static
OMAP: DSS2: use __exit for selected panel drivers
OMAP: DSS2: Convert simple/strict_strto* to kstrto*
OMAP: DSS2: improve clock debugfs output
OMAP: DSS2: DSI: Add lane override functions
OMAP: DSS2: DSI: Remove CIO LDO status check
OMAP: DSS2: DSI: implement ULPS enter and exit
OMAP: DSS2: DSI: add option to leave DSI lanes powered on
OMAP: DSS2: DSI: rename complexio related functions
OMAP: DSS2: Add FEAT_DSI_REVERSE_TXCLKESC
OMAP: DSS2: DSI: fix _dsi_print_reset_status
OMAP: DSS2: DSI: implement enable/disable SCP clk
OMAP: DSS2: DSI: fix CIO init and uninit
OMAP: DSS2: DSI: wait for TXCLKESC domain to come out of reset
OMAP: DSS2: DSI: add parameter to enter ulps on disable
OMAP: DSS2: DSI: Add DSI pad muxing support
OMAP: DSS2: DSI: ensure VDDS_DSI is disabled on exit
OMAP: DSS2: Taal: Implement configurable ESD interval
OMAP: DSS2: Taal: Clean up ESD queueing
OMAP: DSS2: Taal: Add sysfs file for ESD interval
OMAP: DSS2: Taal: Separate panel reset
OMAP: DSS2: Taal: Rename esd_wq to workqueue
OMAP: DSS2: Taal: Implement ULPS functionality
OMAP: DSS2: DSI: Add OMAP4 CIO irqs
OMAP: DSS2: FEATURES: Add missing consts
OMAP: DSS2: Remove DSS_IRQSTATUS
OMAP: DSS2: Add missing dummy functions
OMAPFB: fix wrong clock aliases and device name
OMAP: DSS2: RFBI: add rfbi_bus_lock
OMAP: DSS2: RFBI: clock enable/disable changes
OMAP: DSS2: RFBI: add omap_rfbi_configure
OMAP: DSS2: RFBI: cleanup
OMAP: DSS2: OMAPFB: remove dead code
OMAP: DSS2: OMAPFB: Reduce stack usage
Tormod Volden (2):
savagefb: New S3_TWISTER and S3_PROSAVAGEDDR chip families
savagefb: Enable LCD detection on mobile Twister
Vikram Pandita (1):
OMAP: DSS2: DSI: enable interface for omap4
arch/arm/mach-omap2/board-3430sdp.c | 4 +-
arch/arm/mach-omap2/board-4430sdp.c | 11 +-
arch/arm/mach-omap2/board-am3517evm.c | 4 +-
arch/arm/mach-omap2/board-cm-t35.c | 4 +-
arch/arm/mach-omap2/board-devkit8000.c | 4 +-
arch/arm/mach-omap2/board-igep0020.c | 4 +-
arch/arm/mach-omap2/board-omap3beagle.c | 4 +-
arch/arm/mach-omap2/board-omap3evm.c | 4 +-
arch/arm/mach-omap2/board-omap3pandora.c | 2 +-
arch/arm/mach-omap2/board-omap3stalker.c | 4 +-
arch/arm/mach-omap2/board-omap4panda.c | 4 +-
arch/arm/mach-omap2/board-overo.c | 4 +-
arch/arm/mach-omap2/board-rx51-video.c | 2 +-
arch/arm/mach-omap2/board-zoom-display.c | 2 +-
arch/arm/mach-omap2/display.c | 77 +-
arch/arm/mach-omap2/include/mach/board-zoom.h | 2 +-
drivers/media/video/omap/omap_vout.c | 2 +-
drivers/media/video/omap/omap_voutdef.h | 2 +-
drivers/video/Kconfig | 42 +-
drivers/video/Makefile | 1 +
drivers/video/amifb.c | 27 +-
drivers/video/da8xx-fb.c | 4 +-
drivers/video/efifb.c | 4 +-
drivers/video/mb862xx/Makefile | 5 +-
drivers/video/mb862xx/mb862xx-i2c.c | 177 ++
drivers/video/mb862xx/mb862xx_reg.h | 58 +-
drivers/video/mb862xx/mb862xxfb.h | 36 +
.../video/mb862xx/{mb862xxfb.c => mb862xxfbdrv.c} | 152 ++-
drivers/video/omap/dispc.c | 4 +-
drivers/video/omap/omapfb_main.c | 2 +-
drivers/video/omap/rfbi.c | 2 +-
drivers/video/omap2/Makefile | 4 +-
drivers/video/omap2/displays/Kconfig | 9 +-
drivers/video/omap2/displays/panel-acx565akm.c | 2 +-
drivers/video/omap2/displays/panel-generic-dpi.c | 57 +-
.../omap2/displays/panel-lgphilips-lb035q02.c | 2 +-
.../omap2/displays/panel-nec-nl8048hl11-01b.c | 2 +-
.../video/omap2/displays/panel-sharp-ls037v7dw01.c | 6 +-
drivers/video/omap2/displays/panel-taal.c | 536 ++++-
.../video/omap2/displays/panel-tpo-td043mtea1.c | 10 +-
drivers/video/omap2/dss/Kconfig | 33 +-
drivers/video/omap2/dss/core.c | 15 +-
drivers/video/omap2/dss/dispc.c | 1552 +++++++------
drivers/video/omap2/dss/dispc.h | 691 ++++++
drivers/video/omap2/dss/display.c | 46 +-
drivers/video/omap2/dss/dpi.c | 113 +-
drivers/video/omap2/dss/dsi.c | 2367 +++++++++++++-------
drivers/video/omap2/dss/dss.c | 118 +-
drivers/video/omap2/dss/dss.h | 98 +-
drivers/video/omap2/dss/dss_features.c | 105 +-
drivers/video/omap2/dss/dss_features.h | 39 +-
drivers/video/omap2/dss/hdmi.c | 461 ++++-
drivers/video/omap2/dss/hdmi.h | 222 ++-
drivers/video/omap2/dss/hdmi_omap4_panel.c | 2 +-
drivers/video/omap2/dss/manager.c | 14 +-
drivers/video/omap2/dss/overlay.c | 43 +-
drivers/video/omap2/dss/rfbi.c | 176 +--
drivers/video/omap2/dss/sdi.c | 2 +-
drivers/video/omap2/dss/venc.c | 23 +-
drivers/video/omap2/omapfb/omapfb-ioctl.c | 14 +-
drivers/video/omap2/omapfb/omapfb-main.c | 231 ++-
drivers/video/omap2/omapfb/omapfb-sysfs.c | 23 +-
drivers/video/omap2/omapfb/omapfb.h | 8 +-
drivers/video/s3c-fb.c | 121 +-
drivers/video/s3c2410fb.c | 8 +-
drivers/video/s3fb.c | 209 ++-
drivers/video/savage/savagefb-i2c.c | 2 +
drivers/video/savage/savagefb.h | 8 +-
drivers/video/savage/savagefb_driver.c | 15 +-
drivers/video/sh7760fb.c | 6 +-
drivers/video/sh_mobile_hdmi.c | 10 +-
drivers/video/sh_mobile_lcdcfb.c | 126 +-
drivers/video/sh_mobile_lcdcfb.h | 1 +
drivers/video/sh_mobile_meram.c | 567 +++++
drivers/video/sh_mobile_meram.h | 41 +
drivers/video/sm501fb.c | 24 +-
drivers/video/udlfb.c | 20 +-
.../video/omap-panel-generic-dpi.h | 8 +-
.../video/omap-panel-nokia-dsi.h | 14 +-
.../plat/display.h => include/video/omapdss.h | 114 +-
include/video/sh_mobile_lcdc.h | 3 +
include/video/sh_mobile_meram.h | 68 +
82 files changed, 6771 insertions(+), 2272 deletions(-)
create mode 100644 drivers/video/mb862xx/mb862xx-i2c.c
rename drivers/video/mb862xx/{mb862xxfb.c => mb862xxfbdrv.c} (86%)
create mode 100644 drivers/video/omap2/dss/dispc.h
create mode 100644 drivers/video/sh_mobile_meram.c
create mode 100644 drivers/video/sh_mobile_meram.h
rename arch/arm/plat-omap/include/plat/panel-generic-dpi.h => include/video/omap-panel-generic-dpi.h (86%)
rename arch/arm/plat-omap/include/plat/nokia-dsi-panel.h => include/video/omap-panel-nokia-dsi.h (65%)
rename arch/arm/plat-omap/include/plat/display.h => include/video/omapdss.h (85%)
create mode 100644 include/video/sh_mobile_meram.h
^ permalink raw reply
* Re: [PATCH 0/5] mb862xxfb driver update for 2.6.40
From: Paul Mundt @ 2011-05-25 2:07 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <1305302089-7666-1-git-send-email-agust@denx.de>
On Tue, May 24, 2011 at 05:14:29PM +0200, Anatolij Gustschin wrote:
> On Fri, 13 May 2011 17:54:44 +0200
> Anatolij Gustschin <agust@denx.de> wrote:
>
> > This patch series extends the driver for Coral GDCs to support
> > such controller features as video layer L1 and I2C bus for video
> > decoder chips. First three patches are small fixes and improvements.
>
> Updated patches addressing comments can be pulled now. I rebased
> them to apply on top of current fbdev-2.6 git tree.
>
> The following changes since commit af1ce6b2fad7d572aef040d61a935da28a861853:
>
> video: s3c-fb: correct transparency checking in 32bpp (2011-05-24 18:04:37 +0900)
>
> are available in the git repository at:
> git://git.denx.de/linux-2.6-agust.git mb862xxfb-for-next
>
Pulled, thanks.
^ permalink raw reply
* Re: [PATCH] fbmem: fix race condition between
From: Bruno Prémont @ 2011-05-24 20:45 UTC (permalink / raw)
To: Fabio Erculiani; +Cc: linux-fbdev, lethal, linux-kernel
In-Reply-To: <1306266871-12464-1-git-send-email-lxnay@sabayon.org>
On Tue, 24 May 2011 Fabio Erculiani <lxnay@sabayon.org> wrote:
> register_framebuffer() acquires registration_lock, then calls
> do_register_framebuffer() which calls fb_notifier_call_chain()
> which calls fb_open() which calls get_fb_info() which tries
> (at last) to acquire registration_lock again.
> This is a workaround.
What calls fb_open() instead of just calling fb_info->fbops->fb_open
when it is set?
In other words what kernel handler of fb_notifier chain does file-based
open of the framebuffer or is the event pushed out synchronously to
userspace?
> Signed-off-by: Fabio Erculiani <lxnay@sabayon.org>
> ---
> drivers/video/fbmem.c | 13 ++++++++++++-
> 1 files changed, 12 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
> index 5aac00e..b9831a0 100644
> --- a/drivers/video/fbmem.c
> +++ b/drivers/video/fbmem.c
> @@ -1628,6 +1628,11 @@ static int do_register_framebuffer(struct fb_info *fb_info)
> event.info = fb_info;
> if (!lock_fb_info(fb_info))
> return -ENODEV;
> +
> + /* FIXME: unlock registration mutex before registration
> + * notification is sent, in order to avoid deadlock.
> + */
> + mutex_unlock(®istration_lock);
> fb_notifier_call_chain(FB_EVENT_FB_REGISTERED, &event);
> unlock_fb_info(fb_info);
> return 0;
> @@ -1692,7 +1697,13 @@ register_framebuffer(struct fb_info *fb_info)
>
> mutex_lock(®istration_lock);
> ret = do_register_framebuffer(fb_info);
> - mutex_unlock(®istration_lock);
> + if (ret != 0)
> + /*
> + * FIXME: mutex is unlocked only if ret = 0.
> + * This is the second part of the workaround
> + * that prevents deadlocking.
> + */
> + mutex_unlock(®istration_lock);
>
> return ret;
> }
^ permalink raw reply
* [Patch 2/2 resend] Prevent vga16fb from accessing hw after it was
From: Bruno Prémont @ 2011-05-24 20:32 UTC (permalink / raw)
To: linux-fbdev
Since fb_info is refcounted it can successfully remain open while
being unregistered (though not freed).
Prevent the following sequence to corrupt modify hardware state
behind back of native driver that took over control of hardware:
- vga16fb registered
+ open /dev/fb0 (vga16fb)
- load native driver
- unregisters conflicting vga16fb
- configures GPU with nouveaufb and more
- fbcon takes over
+ close /dev/fb0
+ vga16fb resets hw to vgacon mode (in fbops.fb_release)
Add a new callback fb_unregistered to struct fbops to be called
at end of unregister_framebuffer() so interested drivers can
get know their fb was unregistered (previously they would know
through fb_destroy callback but now that callback may happen
way later)
Prevent such hardware access by setting a flag with new fb_unregistered
callback and checking it when vga16fb framebuffer is last closed and
skipping vga state restore in case it's not registered anymore.
CC: stable@kernel.org
Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
---
Resend as my MUA decided to take wrong source address...
This should also go into 2.6.39 stable as it didn't make it into 2.6.39
with the rest of fb_info refcounting work.
This comes from
[2.6.39-rc2, framebuffer] use after free oops
...
[PATCH 0/2] fbcon sanity
thread
---
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 5aac00e..bd9f93b 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -1661,6 +1661,11 @@ static int do_unregister_framebuffer(struct fb_info *fb_info)
device_destroy(fb_class, MKDEV(FB_MAJOR, i));
event.info = fb_info;
fb_notifier_call_chain(FB_EVENT_FB_UNREGISTERED, &event);
+ if (fb_info->fbops->fb_unregistered) {
+ mutex_lock(&fb_info->lock);
+ fb_info->fbops->fb_unregistered(fb_info);
+ mutex_unlock(&fb_info->lock);
+ }
/* this may free fb info */
put_fb_info(fb_info);
diff --git a/drivers/video/vga16fb.c b/drivers/video/vga16fb.c
index 53b2c5a..dad96e1 100644
--- a/drivers/video/vga16fb.c
+++ b/drivers/video/vga16fb.c
@@ -59,7 +59,7 @@ struct vga16fb_par {
struct vgastate state;
unsigned int ref_count;
int palette_blanked, vesa_blanked, mode, isVGA;
- u8 misc, pel_msk, vss, clkdiv;
+ u8 misc, pel_msk, vss, clkdiv, unregistered;
u8 crtc[VGA_CRT_C];
};
@@ -302,7 +302,7 @@ static int vga16fb_release(struct fb_info *info, int user)
if (!par->ref_count)
return -EINVAL;
- if (par->ref_count = 1)
+ if (par->ref_count = 1 && !par->unregistered)
restore_vga(&par->state);
par->ref_count--;
@@ -1271,19 +1271,26 @@ static void vga16fb_destroy(struct fb_info *info)
framebuffer_release(info);
}
+static void vga16fb_unregistered(struct fb_info *info)
+{
+ struct vga16fb_par *par = info->par;
+ par->unregistered = 1;
+}
+
static struct fb_ops vga16fb_ops = {
- .owner = THIS_MODULE,
- .fb_open = vga16fb_open,
- .fb_release = vga16fb_release,
- .fb_destroy = vga16fb_destroy,
- .fb_check_var = vga16fb_check_var,
- .fb_set_par = vga16fb_set_par,
- .fb_setcolreg = vga16fb_setcolreg,
- .fb_pan_display = vga16fb_pan_display,
- .fb_blank = vga16fb_blank,
- .fb_fillrect = vga16fb_fillrect,
- .fb_copyarea = vga16fb_copyarea,
- .fb_imageblit = vga16fb_imageblit,
+ .owner = THIS_MODULE,
+ .fb_open = vga16fb_open,
+ .fb_release = vga16fb_release,
+ .fb_destroy = vga16fb_destroy,
+ .fb_unregistered = vga16fb_unregistered,
+ .fb_check_var = vga16fb_check_var,
+ .fb_set_par = vga16fb_set_par,
+ .fb_setcolreg = vga16fb_setcolreg,
+ .fb_pan_display = vga16fb_pan_display,
+ .fb_blank = vga16fb_blank,
+ .fb_fillrect = vga16fb_fillrect,
+ .fb_copyarea = vga16fb_copyarea,
+ .fb_imageblit = vga16fb_imageblit,
};
#ifndef MODULE
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 6a82748..22a8796 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -685,6 +685,9 @@ struct fb_ops {
void (*fb_get_caps)(struct fb_info *info, struct fb_blit_caps *caps,
struct fb_var_screeninfo *var);
+ /* teardown hardware for this framebuffer (another driver may get
+ * ownership of hardware after this returns) */
+ void (*fb_unregistered)(struct fb_info *info);
/* teardown any resources to do with this framebuffer */
void (*fb_destroy)(struct fb_info *info);
^ permalink raw reply related
* [Patch 1/2] Fix use-after-free by vga16fb on rmmod
From: Bruno Prémont @ 2011-05-24 19:59 UTC (permalink / raw)
To: linux-fbdev
Since fb_info is now refcounted and thus may get freed at any time it
gets unregistered module unloading will try to unregister framebuffer
as stored in platform data on probe though this pointer may
be stale.
Cleanup platform data on framebuffer release.
CC: stable@kernel.org
Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
---
This should also go into 2.6.39 stable as it didn't make it into 2.6.39
with the rest of fb_info refcounting work.
This comes from
[2.6.39-rc2, framebuffer] use after free oops
...
[PATCH 0/2] fbcon sanity
thread
---
diff --git a/drivers/video/vga16fb.c b/drivers/video/vga16fb.c
index 53b2c5a..2bcfe32 100644
--- a/drivers/video/vga16fb.c
+++ b/drivers/video/vga16fb.c
@@ -1265,9 +1265,11 @@ static void vga16fb_imageblit(struct fb_info *info, const struct fb_image *image
static void vga16fb_destroy(struct fb_info *info)
{
+ struct platform_device *dev = container_of(info->device, struct platform_device, dev);
iounmap(info->screen_base);
fb_dealloc_cmap(&info->cmap);
/* XXX unshare VGA regions */
+ platform_set_drvdata(dev, NULL);
framebuffer_release(info);
}
^ permalink raw reply related
* [PATCH] fbmem: fix race condition between register_framebuffer() and fb_open()
From: Fabio Erculiani @ 2011-05-24 19:54 UTC (permalink / raw)
To: linux-fbdev; +Cc: lethal, linux-kernel, Fabio Erculiani
register_framebuffer() acquires registration_lock, then calls
do_register_framebuffer() which calls fb_notifier_call_chain()
which calls fb_open() which calls get_fb_info() which tries
(at last) to acquire registration_lock again.
This is a workaround.
Signed-off-by: Fabio Erculiani <lxnay@sabayon.org>
---
drivers/video/fbmem.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 5aac00e..b9831a0 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -1628,6 +1628,11 @@ static int do_register_framebuffer(struct fb_info *fb_info)
event.info = fb_info;
if (!lock_fb_info(fb_info))
return -ENODEV;
+
+ /* FIXME: unlock registration mutex before registration
+ * notification is sent, in order to avoid deadlock.
+ */
+ mutex_unlock(®istration_lock);
fb_notifier_call_chain(FB_EVENT_FB_REGISTERED, &event);
unlock_fb_info(fb_info);
return 0;
@@ -1692,7 +1697,13 @@ register_framebuffer(struct fb_info *fb_info)
mutex_lock(®istration_lock);
ret = do_register_framebuffer(fb_info);
- mutex_unlock(®istration_lock);
+ if (ret != 0)
+ /*
+ * FIXME: mutex is unlocked only if ret = 0.
+ * This is the second part of the workaround
+ * that prevents deadlocking.
+ */
+ mutex_unlock(®istration_lock);
return ret;
}
--
1.7.5.rc1
^ permalink raw reply related
* Re: [PATCH 0/5] mb862xxfb driver update for 2.6.40
From: Anatolij Gustschin @ 2011-05-24 15:14 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <1305302089-7666-1-git-send-email-agust@denx.de>
On Fri, 13 May 2011 17:54:44 +0200
Anatolij Gustschin <agust@denx.de> wrote:
> This patch series extends the driver for Coral GDCs to support
> such controller features as video layer L1 and I2C bus for video
> decoder chips. First three patches are small fixes and improvements.
Updated patches addressing comments can be pulled now. I rebased
them to apply on top of current fbdev-2.6 git tree.
The following changes since commit af1ce6b2fad7d572aef040d61a935da28a861853:
video: s3c-fb: correct transparency checking in 32bpp (2011-05-24 18:04:37 +0900)
are available in the git repository at:
git://git.denx.de/linux-2.6-agust.git mb862xxfb-for-next
Anatolij Gustschin (5):
video: mb862xxfb: correct fix.smem_len field initialization
video: mb862xxfb: use pre-initialized configuration for PCI GDCs
video: mb862xxfb: relocate register space to get contiguous vram
video: mb862xx: add support for controller's I2C bus adapter
video: mb862xxfb: add support for L1 displaying
drivers/video/Kconfig | 9 +
drivers/video/mb862xx/Makefile | 5 +-
drivers/video/mb862xx/mb862xx-i2c.c | 177 ++++++++++++++++++++
drivers/video/mb862xx/mb862xx_reg.h | 58 ++++++-
drivers/video/mb862xx/mb862xxfb.h | 36 ++++
.../video/mb862xx/{mb862xxfb.c => mb862xxfbdrv.c} | 152 ++++++++++++++++-
6 files changed, 425 insertions(+), 12 deletions(-)
create mode 100644 drivers/video/mb862xx/mb862xx-i2c.c
rename drivers/video/mb862xx/{mb862xxfb.c => mb862xxfbdrv.c} (86%)
Thanks,
Anatolij
^ permalink raw reply
* [PATCH v2 5/5] video: mb862xxfb: add support for L1 displaying
From: Anatolij Gustschin @ 2011-05-24 15:05 UTC (permalink / raw)
To: linux-fbdev
Allow displaying L1 video data on top of the primary L0 layer.
The L1 layer position and dimensions can be configured and the
layer enabled/disabled by using the appropriate L1 controls
added by this patch.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
v2:
- rebase to apply cleanly on top of previous 4/5 patch
drivers/video/mb862xx/mb862xx_reg.h | 31 +++++++++
drivers/video/mb862xx/mb862xxfb.h | 27 ++++++++
drivers/video/mb862xx/mb862xxfbdrv.c | 116 +++++++++++++++++++++++++++++++++-
3 files changed, 173 insertions(+), 1 deletions(-)
diff --git a/drivers/video/mb862xx/mb862xx_reg.h b/drivers/video/mb862xx/mb862xx_reg.h
index 5784b01..9df48b8 100644
--- a/drivers/video/mb862xx/mb862xx_reg.h
+++ b/drivers/video/mb862xx/mb862xx_reg.h
@@ -51,10 +51,16 @@
#define GC_L0OA0 0x00000024
#define GC_L0DA0 0x00000028
#define GC_L0DY_L0DX 0x0000002c
+#define GC_L1M 0x00000030
+#define GC_L1DA 0x00000034
#define GC_DCM1 0x00000100
#define GC_L0EM 0x00000110
#define GC_L0WY_L0WX 0x00000114
#define GC_L0WH_L0WW 0x00000118
+#define GC_L1EM 0x00000120
+#define GC_L1WY_L1WX 0x00000124
+#define GC_L1WH_L1WW 0x00000128
+#define GC_DLS 0x00000180
#define GC_DCM2 0x00000104
#define GC_DCM3 0x00000108
#define GC_CPM_CUTC 0x000000a0
@@ -66,6 +72,11 @@
#define GC_CPM_CEN0 0x00100000
#define GC_CPM_CEN1 0x00200000
+#define GC_DCM1_DEN 0x80000000
+#define GC_DCM1_L1E 0x00020000
+#define GC_L1M_16 0x80000000
+#define GC_L1M_YC 0x40000000
+#define GC_L1M_CS 0x20000000
#define GC_DCM01_ESY 0x00000004
#define GC_DCM01_SC 0x00003f00
@@ -77,6 +88,7 @@
#define GC_L0M_L0C_16 0x80000000
#define GC_L0EM_L0EC_24 0x40000000
#define GC_L0M_L0W_UNIT 64
+#define GC_L1EM_DM 0x02000000
#define GC_DISP_REFCLK_400 400
@@ -101,6 +113,25 @@
#define I2C_TRX 0x80
#define I2C_LRB 0x10
+/* Capture registers and bits */
+#define GC_CAP_VCM 0x00000000
+#define GC_CAP_CSC 0x00000004
+#define GC_CAP_VCS 0x00000008
+#define GC_CAP_CBM 0x00000010
+#define GC_CAP_CBOA 0x00000014
+#define GC_CAP_CBLA 0x00000018
+#define GC_CAP_IMG_START 0x0000001C
+#define GC_CAP_IMG_END 0x00000020
+#define GC_CAP_CMSS 0x00000048
+#define GC_CAP_CMDS 0x0000004C
+
+#define GC_VCM_VIE 0x80000000
+#define GC_VCM_CM 0x03000000
+#define GC_VCM_VS_PAL 0x00000002
+#define GC_CBM_OO 0x80000000
+#define GC_CBM_HRV 0x00000010
+#define GC_CBM_CBST 0x00000001
+
/* Carmine specific */
#define MB86297_DRAW_BASE 0x00020000
#define MB86297_DISP0_BASE 0x00100000
diff --git a/drivers/video/mb862xx/mb862xxfb.h b/drivers/video/mb862xx/mb862xxfb.h
index d5dd7d9..8550630 100644
--- a/drivers/video/mb862xx/mb862xxfb.h
+++ b/drivers/video/mb862xx/mb862xxfb.h
@@ -1,6 +1,26 @@
#ifndef __MB862XX_H__
#define __MB862XX_H__
+struct mb862xx_l1_cfg {
+ unsigned short sx;
+ unsigned short sy;
+ unsigned short sw;
+ unsigned short sh;
+ unsigned short dx;
+ unsigned short dy;
+ unsigned short dw;
+ unsigned short dh;
+ int mirror;
+};
+
+#define MB862XX_BASE 'M'
+#define MB862XX_L1_GET_CFG _IOR(MB862XX_BASE, 0, struct mb862xx_l1_cfg*)
+#define MB862XX_L1_SET_CFG _IOW(MB862XX_BASE, 1, struct mb862xx_l1_cfg*)
+#define MB862XX_L1_ENABLE _IOW(MB862XX_BASE, 2, int)
+#define MB862XX_L1_CAP_CTL _IOW(MB862XX_BASE, 3, int)
+
+#ifdef __KERNEL__
+
#define PCI_VENDOR_ID_FUJITSU_LIMITED 0x10cf
#define PCI_DEVICE_ID_FUJITSU_CORALP 0x2019
#define PCI_DEVICE_ID_FUJITSU_CORALPA 0x201e
@@ -38,6 +58,8 @@ struct mb862xxfb_par {
void __iomem *mmio_base; /* remapped registers */
size_t mapped_vram; /* length of remapped vram */
size_t mmio_len; /* length of register region */
+ unsigned long cap_buf; /* capture buffers offset */
+ size_t cap_len; /* length of capture buffers */
void __iomem *host; /* relocatable reg. bases */
void __iomem *i2c;
@@ -60,6 +82,9 @@ struct mb862xxfb_par {
struct i2c_adapter *adap; /* GDC I2C bus adapter */
int i2c_rs;
+ struct mb862xx_l1_cfg l1_cfg;
+ int l1_stride;
+
u32 pseudo_palette[16];
};
@@ -91,4 +116,6 @@ static inline void mb862xx_i2c_exit(struct mb862xxfb_par *par) { }
#define pack(a, b) (((a) << 16) | (b))
+#endif /* __KERNEL__ */
+
#endif
diff --git a/drivers/video/mb862xx/mb862xxfbdrv.c b/drivers/video/mb862xx/mb862xxfbdrv.c
index 0cc20b4..ea39336 100644
--- a/drivers/video/mb862xx/mb862xxfbdrv.c
+++ b/drivers/video/mb862xx/mb862xxfbdrv.c
@@ -27,7 +27,7 @@
#define NR_PALETTE 256
#define MB862XX_MEM_SIZE 0x1000000
-#define CORALP_MEM_SIZE 0x4000000
+#define CORALP_MEM_SIZE 0x2000000
#define CARMINE_MEM_SIZE 0x8000000
#define DRV_NAME "mb862xxfb"
@@ -309,6 +309,97 @@ static int mb862xxfb_blank(int mode, struct fb_info *fbi)
return 0;
}
+static int mb862xxfb_ioctl(struct fb_info *fbi, unsigned int cmd,
+ unsigned long arg)
+{
+ struct mb862xxfb_par *par = fbi->par;
+ struct mb862xx_l1_cfg *l1_cfg = &par->l1_cfg;
+ void __user *argp = (void __user *)arg;
+ int *enable;
+ u32 l1em = 0;
+
+ switch (cmd) {
+ case MB862XX_L1_GET_CFG:
+ if (copy_to_user(argp, l1_cfg, sizeof(*l1_cfg)))
+ return -EFAULT;
+ break;
+ case MB862XX_L1_SET_CFG:
+ if (copy_from_user(l1_cfg, argp, sizeof(*l1_cfg)))
+ return -EFAULT;
+ if ((l1_cfg->sw >= l1_cfg->dw) && (l1_cfg->sh >= l1_cfg->dh)) {
+ /* downscaling */
+ outreg(cap, GC_CAP_CSC,
+ pack((l1_cfg->sh << 11) / l1_cfg->dh,
+ (l1_cfg->sw << 11) / l1_cfg->dw));
+ l1em = inreg(disp, GC_L1EM);
+ l1em &= ~GC_L1EM_DM;
+ } else if ((l1_cfg->sw <= l1_cfg->dw) &&
+ (l1_cfg->sh <= l1_cfg->dh)) {
+ /* upscaling */
+ outreg(cap, GC_CAP_CSC,
+ pack((l1_cfg->sh << 11) / l1_cfg->dh,
+ (l1_cfg->sw << 11) / l1_cfg->dw));
+ outreg(cap, GC_CAP_CMSS,
+ pack(l1_cfg->sw >> 1, l1_cfg->sh));
+ outreg(cap, GC_CAP_CMDS,
+ pack(l1_cfg->dw >> 1, l1_cfg->dh));
+ l1em = inreg(disp, GC_L1EM);
+ l1em |= GC_L1EM_DM;
+ }
+
+ if (l1_cfg->mirror) {
+ outreg(cap, GC_CAP_CBM,
+ inreg(cap, GC_CAP_CBM) | GC_CBM_HRV);
+ l1em |= l1_cfg->dw * 2 - 8;
+ } else {
+ outreg(cap, GC_CAP_CBM,
+ inreg(cap, GC_CAP_CBM) & ~GC_CBM_HRV);
+ l1em &= 0xffff0000;
+ }
+ outreg(disp, GC_L1EM, l1em);
+ break;
+ case MB862XX_L1_ENABLE:
+ enable = (int *)arg;
+ if (*enable) {
+ outreg(disp, GC_L1DA, par->cap_buf);
+ outreg(cap, GC_CAP_IMG_START,
+ pack(l1_cfg->sy >> 1, l1_cfg->sx));
+ outreg(cap, GC_CAP_IMG_END,
+ pack(l1_cfg->sh, l1_cfg->sw));
+ outreg(disp, GC_L1M, GC_L1M_16 | GC_L1M_YC | GC_L1M_CS |
+ (par->l1_stride << 16));
+ outreg(disp, GC_L1WY_L1WX,
+ pack(l1_cfg->dy, l1_cfg->dx));
+ outreg(disp, GC_L1WH_L1WW,
+ pack(l1_cfg->dh - 1, l1_cfg->dw));
+ outreg(disp, GC_DLS, 1);
+ outreg(cap, GC_CAP_VCM,
+ GC_VCM_VIE | GC_VCM_CM | GC_VCM_VS_PAL);
+ outreg(disp, GC_DCM1, inreg(disp, GC_DCM1) |
+ GC_DCM1_DEN | GC_DCM1_L1E);
+ } else {
+ outreg(cap, GC_CAP_VCM,
+ inreg(cap, GC_CAP_VCM) & ~GC_VCM_VIE);
+ outreg(disp, GC_DCM1,
+ inreg(disp, GC_DCM1) & ~GC_DCM1_L1E);
+ }
+ break;
+ case MB862XX_L1_CAP_CTL:
+ enable = (int *)arg;
+ if (*enable) {
+ outreg(cap, GC_CAP_VCM,
+ inreg(cap, GC_CAP_VCM) | GC_VCM_VIE);
+ } else {
+ outreg(cap, GC_CAP_VCM,
+ inreg(cap, GC_CAP_VCM) & ~GC_VCM_VIE);
+ }
+ break;
+ default:
+ return -EINVAL;
+ }
+ return 0;
+}
+
/* framebuffer ops */
static struct fb_ops mb862xxfb_ops = {
.owner = THIS_MODULE,
@@ -320,6 +411,7 @@ static struct fb_ops mb862xxfb_ops = {
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
.fb_imageblit = cfb_imageblit,
+ .fb_ioctl = mb862xxfb_ioctl,
};
/* initialize fb_info data */
@@ -328,6 +420,7 @@ static int mb862xxfb_init_fbinfo(struct fb_info *fbi)
struct mb862xxfb_par *par = fbi->par;
struct mb862xx_gc_mode *mode = par->gc_mode;
unsigned long reg;
+ int stride;
fbi->fbops = &mb862xxfb_ops;
fbi->pseudo_palette = par->pseudo_palette;
@@ -420,6 +513,27 @@ static int mb862xxfb_init_fbinfo(struct fb_info *fbi)
fbi->fix.line_length = (fbi->var.xres_virtual *
fbi->var.bits_per_pixel) / 8;
fbi->fix.smem_len = fbi->fix.line_length * fbi->var.yres_virtual;
+
+ /*
+ * reserve space for capture buffers and two cursors
+ * at the end of vram: 720x576 * 2 * 2.2 + 64x64 * 16.
+ */
+ par->cap_buf = par->mapped_vram - 0x1bd800 - 0x10000;
+ par->cap_len = 0x1bd800;
+ par->l1_cfg.sx = 0;
+ par->l1_cfg.sy = 0;
+ par->l1_cfg.sw = 720;
+ par->l1_cfg.sh = 576;
+ par->l1_cfg.dx = 0;
+ par->l1_cfg.dy = 0;
+ par->l1_cfg.dw = 720;
+ par->l1_cfg.dh = 576;
+ stride = par->l1_cfg.sw * (fbi->var.bits_per_pixel / 8);
+ par->l1_stride = stride / 64 + ((stride % 64) ? 1 : 0);
+ outreg(cap, GC_CAP_CBM, GC_CBM_OO | GC_CBM_CBST |
+ (par->l1_stride << 16));
+ outreg(cap, GC_CAP_CBOA, par->cap_buf);
+ outreg(cap, GC_CAP_CBLA, par->cap_buf + par->cap_len);
return 0;
}
--
1.7.1
^ permalink raw reply related
* [PATCH v2 4/5] video: mb862xx: add support for controller's I2C bus adapter
From: Anatolij Gustschin @ 2011-05-24 15:04 UTC (permalink / raw)
To: linux-fbdev
Add adapter driver for I2C adapter in Coral-P(A)/Lime GDCs.
So we can easily access devices on controller's I2C bus using
i2c-dev interface.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
v2:
- add Kconfig option for GDC I2C adapter driver,
fixes CONFIG_I2C=n build issue as pointed out by Paul
- fix to remove I2C adapter on module unload
- rename main mb862xx fb driver file to prevent mb862xxfb.o
circular dependency warnings from make
- rebase to apply cleanly on top of current fbdev-2.6 git tree
drivers/video/Kconfig | 9 +
drivers/video/mb862xx/Makefile | 5 +-
drivers/video/mb862xx/mb862xx-i2c.c | 177 ++++++++++++++++++++
drivers/video/mb862xx/mb862xx_reg.h | 21 +++
drivers/video/mb862xx/mb862xxfb.h | 9 +
.../video/mb862xx/{mb862xxfb.c => mb862xxfbdrv.c} | 4 +
6 files changed, 224 insertions(+), 1 deletions(-)
create mode 100644 drivers/video/mb862xx/mb862xx-i2c.c
rename drivers/video/mb862xx/{mb862xxfb.c => mb862xxfbdrv.c} (99%)
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 7326962..549b960 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -2294,6 +2294,15 @@ config FB_MB862XX_LIME
endchoice
+config FB_MB862XX_I2C
+ bool "Support I2C bus on MB862XX GDC"
+ depends on FB_MB862XX && I2C
+ default y
+ help
+ Selecting this option adds Coral-P(A)/Lime GDC I2C bus adapter
+ driver to support accessing I2C devices on controller's I2C bus.
+ These are usually some video decoder chips.
+
config FB_EP93XX
tristate "EP93XX frame buffer support"
depends on FB && ARCH_EP93XX
diff --git a/drivers/video/mb862xx/Makefile b/drivers/video/mb862xx/Makefile
index d777771..5707ed0 100644
--- a/drivers/video/mb862xx/Makefile
+++ b/drivers/video/mb862xx/Makefile
@@ -2,4 +2,7 @@
# Makefile for the MB862xx framebuffer driver
#
-obj-$(CONFIG_FB_MB862XX) := mb862xxfb.o mb862xxfb_accel.o
+obj-$(CONFIG_FB_MB862XX) += mb862xxfb.o
+
+mb862xxfb-y := mb862xxfbdrv.o mb862xxfb_accel.o
+mb862xxfb-$(CONFIG_FB_MB862XX_I2C) += mb862xx-i2c.o
diff --git a/drivers/video/mb862xx/mb862xx-i2c.c b/drivers/video/mb862xx/mb862xx-i2c.c
new file mode 100644
index 0000000..cb77d3b
--- /dev/null
+++ b/drivers/video/mb862xx/mb862xx-i2c.c
@@ -0,0 +1,177 @@
+/*
+ * Coral-P(A)/Lime I2C adapter driver
+ *
+ * (C) 2011 DENX Software Engineering, Anatolij Gustschin <agust@denx.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#include <linux/fb.h>
+#include <linux/i2c.h>
+#include <linux/io.h>
+
+#include "mb862xxfb.h"
+#include "mb862xx_reg.h"
+
+static int mb862xx_i2c_wait_event(struct i2c_adapter *adap)
+{
+ struct mb862xxfb_par *par = adap->algo_data;
+ u32 reg;
+
+ do {
+ udelay(1);
+ reg = inreg(i2c, GC_I2C_BCR);
+ if (reg & (I2C_INT | I2C_BER))
+ break;
+ } while (1);
+
+ return (reg & I2C_BER) ? 0 : 1;
+}
+
+static int mb862xx_i2c_do_address(struct i2c_adapter *adap, int addr)
+{
+ struct mb862xxfb_par *par = adap->algo_data;
+
+ outreg(i2c, GC_I2C_DAR, addr);
+ outreg(i2c, GC_I2C_CCR, I2C_CLOCK_AND_ENABLE);
+ outreg(i2c, GC_I2C_BCR, par->i2c_rs ? I2C_REPEATED_START : I2C_START);
+ if (!mb862xx_i2c_wait_event(adap))
+ return -EIO;
+ par->i2c_rs = !(inreg(i2c, GC_I2C_BSR) & I2C_LRB);
+ return par->i2c_rs;
+}
+
+static int mb862xx_i2c_write_byte(struct i2c_adapter *adap, u8 byte)
+{
+ struct mb862xxfb_par *par = adap->algo_data;
+
+ outreg(i2c, GC_I2C_DAR, byte);
+ outreg(i2c, GC_I2C_BCR, I2C_START);
+ if (!mb862xx_i2c_wait_event(adap))
+ return -EIO;
+ return !(inreg(i2c, GC_I2C_BSR) & I2C_LRB);
+}
+
+static int mb862xx_i2c_read_byte(struct i2c_adapter *adap, u8 *byte, int last)
+{
+ struct mb862xxfb_par *par = adap->algo_data;
+
+ outreg(i2c, GC_I2C_BCR, I2C_START | (last ? 0 : I2C_ACK));
+ if (!mb862xx_i2c_wait_event(adap))
+ return 0;
+ *byte = inreg(i2c, GC_I2C_DAR);
+ return 1;
+}
+
+void mb862xx_i2c_stop(struct i2c_adapter *adap)
+{
+ struct mb862xxfb_par *par = adap->algo_data;
+
+ outreg(i2c, GC_I2C_BCR, I2C_STOP);
+ outreg(i2c, GC_I2C_CCR, I2C_DISABLE);
+ par->i2c_rs = 0;
+}
+
+static int mb862xx_i2c_read(struct i2c_adapter *adap, struct i2c_msg *m)
+{
+ int i, ret = 0;
+ int last = m->len - 1;
+
+ for (i = 0; i < m->len; i++) {
+ if (!mb862xx_i2c_read_byte(adap, &m->buf[i], i = last)) {
+ ret = -EIO;
+ break;
+ }
+ }
+ return ret;
+}
+
+static int mb862xx_i2c_write(struct i2c_adapter *adap, struct i2c_msg *m)
+{
+ int i, ret = 0;
+
+ for (i = 0; i < m->len; i++) {
+ if (!mb862xx_i2c_write_byte(adap, m->buf[i])) {
+ ret = -EIO;
+ break;
+ }
+ }
+ return ret;
+}
+
+static int mb862xx_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
+ int num)
+{
+ struct mb862xxfb_par *par = adap->algo_data;
+ struct i2c_msg *m;
+ int addr;
+ int i = 0, err = 0;
+
+ dev_dbg(par->dev, "%s: %d msgs\n", __func__, num);
+
+ for (i = 0; i < num; i++) {
+ m = &msgs[i];
+ if (!m->len) {
+ dev_dbg(par->dev, "%s: null msgs\n", __func__);
+ continue;
+ }
+ addr = m->addr;
+ if (m->flags & I2C_M_RD)
+ addr |= 1;
+
+ err = mb862xx_i2c_do_address(adap, addr);
+ if (err < 0)
+ break;
+ if (m->flags & I2C_M_RD)
+ err = mb862xx_i2c_read(adap, m);
+ else
+ err = mb862xx_i2c_write(adap, m);
+ }
+
+ if (i)
+ mb862xx_i2c_stop(adap);
+
+ return (err < 0) ? err : i;
+}
+
+static u32 mb862xx_func(struct i2c_adapter *adap)
+{
+ return I2C_FUNC_SMBUS_BYTE_DATA;
+}
+
+static const struct i2c_algorithm mb862xx_algo = {
+ .master_xfer = mb862xx_xfer,
+ .functionality = mb862xx_func,
+};
+
+static struct i2c_adapter mb862xx_i2c_adapter = {
+ .name = "MB862xx I2C adapter",
+ .algo = &mb862xx_algo,
+ .owner = THIS_MODULE,
+};
+
+int mb862xx_i2c_init(struct mb862xxfb_par *par)
+{
+ int ret;
+
+ mb862xx_i2c_adapter.algo_data = par;
+ par->adap = &mb862xx_i2c_adapter;
+
+ ret = i2c_add_adapter(par->adap);
+ if (ret < 0) {
+ dev_err(par->dev, "failed to add %s\n",
+ mb862xx_i2c_adapter.name);
+ }
+ return ret;
+}
+
+void mb862xx_i2c_exit(struct mb862xxfb_par *par)
+{
+ if (par->adap) {
+ i2c_del_adapter(par->adap);
+ par->adap = NULL;
+ }
+}
diff --git a/drivers/video/mb862xx/mb862xx_reg.h b/drivers/video/mb862xx/mb862xx_reg.h
index 737fc01..5784b01 100644
--- a/drivers/video/mb862xx/mb862xx_reg.h
+++ b/drivers/video/mb862xx/mb862xx_reg.h
@@ -80,6 +80,27 @@
#define GC_DISP_REFCLK_400 400
+/* I2C */
+#define GC_I2C_BSR 0x00000000 /* BSR */
+#define GC_I2C_BCR 0x00000004 /* BCR */
+#define GC_I2C_CCR 0x00000008 /* CCR */
+#define GC_I2C_ADR 0x0000000C /* ADR */
+#define GC_I2C_DAR 0x00000010 /* DAR */
+
+#define I2C_DISABLE 0x00000000
+#define I2C_STOP 0x00000000
+#define I2C_START 0x00000010
+#define I2C_REPEATED_START 0x00000030
+#define I2C_CLOCK_AND_ENABLE 0x0000003f
+#define I2C_READY 0x01
+#define I2C_INT 0x01
+#define I2C_INTE 0x02
+#define I2C_ACK 0x08
+#define I2C_BER 0x80
+#define I2C_BEIE 0x40
+#define I2C_TRX 0x80
+#define I2C_LRB 0x10
+
/* Carmine specific */
#define MB86297_DRAW_BASE 0x00020000
#define MB86297_DISP0_BASE 0x00100000
diff --git a/drivers/video/mb862xx/mb862xxfb.h b/drivers/video/mb862xx/mb862xxfb.h
index d7e7cb7..d5dd7d9 100644
--- a/drivers/video/mb862xx/mb862xxfb.h
+++ b/drivers/video/mb862xx/mb862xxfb.h
@@ -57,11 +57,20 @@ struct mb862xxfb_par {
unsigned int refclk; /* disp. reference clock */
struct mb862xx_gc_mode *gc_mode; /* GDC mode init data */
int pre_init; /* don't init display if 1 */
+ struct i2c_adapter *adap; /* GDC I2C bus adapter */
+ int i2c_rs;
u32 pseudo_palette[16];
};
extern void mb862xxfb_init_accel(struct fb_info *info, int xres);
+#ifdef CONFIG_FB_MB862XX_I2C
+extern int mb862xx_i2c_init(struct mb862xxfb_par *par);
+extern void mb862xx_i2c_exit(struct mb862xxfb_par *par);
+#else
+static inline int mb862xx_i2c_init(struct mb862xxfb_par *par) { return 0; }
+static inline void mb862xx_i2c_exit(struct mb862xxfb_par *par) { }
+#endif
#if defined(CONFIG_FB_MB862XX_LIME) && defined(CONFIG_FB_MB862XX_PCI_GDC)
#error "Select Lime GDC or CoralP/Carmine support, but not both together"
diff --git a/drivers/video/mb862xx/mb862xxfb.c b/drivers/video/mb862xx/mb862xxfbdrv.c
similarity index 99%
rename from drivers/video/mb862xx/mb862xxfb.c
rename to drivers/video/mb862xx/mb862xxfbdrv.c
index ffb6a2c..0cc20b4 100644
--- a/drivers/video/mb862xx/mb862xxfb.c
+++ b/drivers/video/mb862xx/mb862xxfbdrv.c
@@ -772,6 +772,8 @@ static int coralp_init(struct mb862xxfb_par *par)
} else {
return -ENODEV;
}
+
+ mb862xx_i2c_init(par);
return 0;
}
@@ -1029,6 +1031,8 @@ static void __devexit mb862xx_pci_remove(struct pci_dev *pdev)
outreg(host, GC_IMASK, 0);
}
+ mb862xx_i2c_exit(par);
+
device_remove_file(&pdev->dev, &dev_attr_dispregs);
pci_set_drvdata(pdev, NULL);
--
1.7.1
^ permalink raw reply related
* Re: [GIT PULL] OMAP DSS updates for 2.6.40
From: Tomi Valkeinen @ 2011-05-24 9:37 UTC (permalink / raw)
To: Paul Mundt; +Cc: lo-ml, lfbdev-ml
In-Reply-To: <20110524063803.GC11986@linux-sh.org>
On Tue, 2011-05-24 at 15:38 +0900, Paul Mundt wrote:
> On Mon, May 23, 2011 at 02:43:24PM +0300, Tomi Valkeinen wrote:
> > Here are the OMAP Display Subsystem updates for 2.6.40.
> >
> > Most of the patches are OMAP4 related, either fixing the old code to
> > allow us to implement new OMAP4 features, or implementing those new
> > features. Other bigger changes are ULPS power management feature and
> > moving the DSS header file from arch/arm/plat-omap/include to
> > include/video.
> >
> Pulled and pushed out, thanks. There were a couple of conflicts, so you
> may want to doublecheck to make sure nothing was inadvertently broken.
I wonder where those conflicts came from...
I think this pull request never made into the 39 rcs:
http://www.mail-archive.com/linux-omap@vger.kernel.org/msg48334.html
I should have checked it, but it seems I've missed those. So you had
those patches in fbdev tree, and I had the same patches in my
development tree (which ended up being rebased a bit), and this led to
those conflicts.
But diff between omapdss in my master branch and fbdev master is null,
so the conflicts were resolved correctly.
Tomi
^ permalink raw reply
* Re: [PATCH] [resend] video: s3c-fb: correct transparency checking in 32bpp
From: Paul Mundt @ 2011-05-24 9:05 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <1306227323-22681-1-git-send-email-jg1.han@samsung.com>
On Tue, May 24, 2011 at 05:55:23PM +0900, Jingoo Han wrote:
> 32bpp means ARGB 8888 in the driver, therfore the transparency length
> and offset should be 8 and 24 respectively. However, the transparency
> length and offset were previously 0, which means that the driver supports
> RGB 888 without alpha blending when 32bpp is used.
>
> So, the transparency checking in 32bpp is corrected so that the
> transparency length and offset are 8 and 24 respectively.
>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
On Tue, May 24, 2011 at 05:55:31PM +0900, Jingoo Han wrote:
> This patch adds gpio setup function to resume function to ensure
> gpio used by FIMD IP and LCD panel during a resume.
>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Curiously the first version appears to have missed patchwork altogether,
and I missed it in my mail folder, too. Applied now, thanks.
^ permalink raw reply
* [PATCH] [resend] video: s3c-fb: add gpio setup function to resume function
From: Jingoo Han @ 2011-05-24 8:55 UTC (permalink / raw)
To: linux-fbdev
This patch adds gpio setup function to resume function to ensure
gpio used by FIMD IP and LCD panel during a resume.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/video/s3c-fb.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
index 6b7c5a8..2bd86a9 100644
--- a/drivers/video/s3c-fb.c
+++ b/drivers/video/s3c-fb.c
@@ -1526,7 +1526,8 @@ static int s3c_fb_resume(struct device *dev)
clk_enable(sfb->bus_clk);
- /* setup registers */
+ /* setup gpio and output polarity controls */
+ pd->setup_gpio();
writel(pd->vidcon1, sfb->regs + VIDCON1);
/* zero all windows before we do anything */
@@ -1584,7 +1585,8 @@ static int s3c_fb_runtime_resume(struct device *dev)
clk_enable(sfb->bus_clk);
- /* setup registers */
+ /* setup gpio and output polarity controls */
+ pd->setup_gpio();
writel(pd->vidcon1, sfb->regs + VIDCON1);
/* zero all windows before we do anything */
--
1.7.1
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox