* Re: [PATCH 4/8] net: freescale: replace CONFIG_8xx by CONFIG_PPC_8xx
From: David Miller @ 2015-03-12 19:27 UTC (permalink / raw)
To: christophe.leroy
Cc: linux-fbdev, linux-serial, user-mode-linux-devel, vitb,
linux-kernel, netdev, linux-mtd, user-mode-linux-user,
pantelis.antoniou, linuxppc-dev
In-Reply-To: <20150312152354.A47721A241F@localhost.localdomain>
From: Christophe Leroy <christophe.leroy@c-s.fr>
Date: Thu, 12 Mar 2015 16:23:54 +0100 (CET)
> Two config options exist to define powerpc MPC8xx:
> * CONFIG_PPC_8xx
> * CONFIG_8xx
> In addition, CONFIG_PPC_8xx also defines CONFIG_CPM1 as
> communication co-processor
>
> arch/powerpc/platforms/Kconfig.cputype has contained the following
> comment about CONFIG_8xx item for some years:
> "# this is temp to handle compat with arch=ppc"
>
> It looks like not many places still have that old CONFIG_8xx used,
> so it is likely to be a good time to get rid of it completely ?
>
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Acked-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply
* Re: [PATCH 0/8] powerpc/8xx: Getting rid of CONFIG_8xx
From: Geert Uytterhoeven @ 2015-03-12 20:20 UTC (permalink / raw)
To: Christophe Leroy
Cc: Linux Fbdev development list, Vitaly Bordug, Paul Mackerras,
Michael Ellerman, Pantelis Antoniou, Jiri Slaby,
Richard Weinberger, Tomi Valkeinen, linux-serial@vger.kernel.org,
Benjamin Herrenschmidt, Jean-Christophe Plagniol-Villard,
David Woodhouse, uml-devel, Jeff Dike, uml-user, Scott Wood,
Karsten Keil, Greg Kroah-Hartman, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, MTD Maling List, Brian Norris,
linuxppc-dev@lists.ozlabs.org
In-Reply-To: <20150312152420.11C821A2425@localhost.localdomain>
On Thu, Mar 12, 2015 at 4:24 PM, Christophe Leroy
<christophe.leroy@c-s.fr> wrote:
> Two config options exist to define powerpc MPC8xx:
> * CONFIG_PPC_8xx
> * CONFIG_8xx
> In addition, CONFIG_PPC_8xx also defines CONFIG_CPM1 as
> communication co-processor
>
> arch/powerpc/platforms/Kconfig.cputype has contained the following
> comment about CONFIG_8xx item for some years:
> "# this is temp to handle compat with arch=ppc"
>
> It looks like not many places still have that old CONFIG_8xx used,
> so it is likely to be a good time to get rid of it completely ?
We also have CONFIG_40x,. CONFIG_44x, and CONFIG_4xx.
There's no CONFIG_PPC_4* though.
Do we want (some) consistency?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply
* [PATCH] staging: sm750fb: braces, indents, spaces fix
From: Ragavendra BN @ 2015-03-13 3:43 UTC (permalink / raw)
To: sudipm.mukherjee, teddy.wang, gregkh, linux-fbdev, devel,
linux-kernel
Signed-off-by: Ragavendra BN <ragavendra.bn@gmail.com>
This patch removes the braces for the single line if statement. It fixes
the indent positions correctly. It fixes the spaces appropriately making the code give no
warnings by the checkpath.pl script check.
---
drivers/staging/sm750fb/ddk750_chip.c | 22 ++++++++--------------
1 file changed, 8 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/sm750fb/ddk750_chip.c b/drivers/staging/sm750fb/ddk750_chip.c
index b71169e..041a05a 100644
--- a/drivers/staging/sm750fb/ddk750_chip.c
+++ b/drivers/staging/sm750fb/ddk750_chip.c
@@ -20,22 +20,16 @@ logical_chip_type_t getChipType()
physicalID = devId750;//either 0x718 or 0x750
physicalRev = revId750;
- if (physicalID = 0x718)
- {
- chip = SM718;
- }
- else if (physicalID = 0x750)
- {
- chip = SM750;
+ if (physicalID = 0x718) {
+ chip = SM718;
+ } else if (physicalID = 0x750) {
+ chip = SM750;
/* SM750 and SM750LE are different in their revision ID only. */
- if (physicalRev = SM750LE_REVISION_ID){
+ if (physicalRev = SM750LE_REVISION_ID)
chip = SM750LE;
- }
- }
- else
- {
- chip = SM_UNKNOWN;
- }
+ } else {
+ chip = SM_UNKNOWN;
+ }
return chip;
}
--
1.7.10.4
^ permalink raw reply related
* Re: [PATCH] staging: sm750fb: braces, indents, spaces fix
From: Sudip Mukherjee @ 2015-03-13 4:58 UTC (permalink / raw)
To: Ragavendra BN; +Cc: teddy.wang, gregkh, linux-fbdev, devel, linux-kernel
In-Reply-To: <20150313034333.GA10618@localhost.localdomain>
On Thu, Mar 12, 2015 at 08:43:33PM -0700, Ragavendra BN wrote:
> Signed-off-by: Ragavendra BN <ragavendra.bn@gmail.com>
>
> This patch removes the braces for the single line if statement. It fixes
> the indent positions correctly. It fixes the spaces appropriately making the code give no
> warnings by the checkpath.pl script check.
>
Signed-off-by line should come here before the ---
> ---
not at the top like you are giving.
Greg has told you once, I am telling now for the second time.
regards
sudip
^ permalink raw reply
* Re: [PATCH] staging: sm750fb: braces, indents, spaces fix
From: Sudip Mukherjee @ 2015-03-13 5:54 UTC (permalink / raw)
To: Ragavendra BN; +Cc: gregkh, linux-fbdev, devel, linux-kernel
In-Reply-To: <20150313051436.GA10544@localhost.localdomain>
On Thu, Mar 12, 2015 at 10:14:36PM -0700, Ragavendra BN wrote:
> This patch removes the braces for the single line if statement. It fixes
> the indent positions correctly. It fixes the spaces appropriately making the code give no
> warnings by the checpath.pl script check.
your From: is still having [user] in your email address.
and you are doing too many things in a single patch. one patch should
do only one type of change.
>
>
> Signed-off-by: Ragavendra BN <ragavendra.bn@gmail.com>
>
this extra blank line is not necessary here.
regards
sudip
^ permalink raw reply
* [PATCH] staging: sm750fb: braces, indents, spaces fix
From: Ragavendra BN @ 2015-03-13 6:11 UTC (permalink / raw)
To: sudipm.mukherjee, teddy.wang, gregkh, linux-fbdev, devel,
linux-kernel
In-Reply-To: <20150313034333.GA10618@localhost.localdomain>
This patch removes the braces for the single line if statement. It fixes
the indent positions correctly. It fixes the spaces appropriately making the code give no
warnings by the checpath.pl script check. Please accept.
Signed-off-by: Ragavendra BN <ragavendra.bn@gmail.com>
---
drivers/staging/sm750fb/ddk750_chip.c | 22 ++++++++--------------
1 file changed, 8 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/sm750fb/ddk750_chip.c b/drivers/staging/sm750fb/ddk750_chip.c
index b71169e..041a05a 100644
--- a/drivers/staging/sm750fb/ddk750_chip.c
+++ b/drivers/staging/sm750fb/ddk750_chip.c
@@ -20,22 +20,16 @@ logical_chip_type_t getChipType()
physicalID = devId750;//either 0x718 or 0x750
physicalRev = revId750;
- if (physicalID = 0x718)
- {
- chip = SM718;
- }
- else if (physicalID = 0x750)
- {
- chip = SM750;
+ if (physicalID = 0x718) {
+ chip = SM718;
+ } else if (physicalID = 0x750) {
+ chip = SM750;
/* SM750 and SM750LE are different in their revision ID only. */
- if (physicalRev = SM750LE_REVISION_ID){
+ if (physicalRev = SM750LE_REVISION_ID)
chip = SM750LE;
- }
- }
- else
- {
- chip = SM_UNKNOWN;
- }
+ } else {
+ chip = SM_UNKNOWN;
+ }
return chip;
}
--
1.7.10.4
^ permalink raw reply related
* Re: [RFC 1/6] drm: Add top level Kconfig option for DRM fbdev emulation
From: Archit Taneja @ 2015-03-13 6:37 UTC (permalink / raw)
To: linux-kernel, linux-arm-msm, Jani Nikula, daniel
Cc: linux-fbdev, dri-devel, tomi.valkeinen, benjamin.gaignard,
treding
In-Reply-To: <20150311151731.GJ3800@phenom.ffwll.local>
On 03/11/2015 08:47 PM, Daniel Vetter wrote:
> On Wed, Mar 11, 2015 at 01:51:02PM +0530, Archit Taneja wrote:
>>
>>
>> On 03/10/2015 05:47 PM, Daniel Vetter wrote:
>>> On Tue, Mar 10, 2015 at 03:52:41PM +0530, Archit Taneja wrote:
>>>> On 03/10/2015 03:35 PM, Daniel Vetter wrote:
>>>>> On Tue, Mar 10, 2015 at 03:22:49PM +0530, Archit Taneja wrote:
>>>>>> On 03/10/2015 03:17 PM, Daniel Vetter wrote:
>>>>>>> On Tue, Mar 10, 2015 at 03:11:28PM +0530, Archit Taneja wrote:
>>>>>>>> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
>>>>>>>> index 151a050..38f83a0 100644
>>>>>>>> --- a/drivers/gpu/drm/Kconfig
>>>>>>>> +++ b/drivers/gpu/drm/Kconfig
>>>>>>>> @@ -40,6 +40,24 @@ config DRM_KMS_FB_HELPER
>>>>>>>> help
>>>>>>>> FBDEV helpers for KMS drivers.
>>>>>>>>
>>>>>>>> +config DRM_FBDEV_EMULATION
>>>>>>>> + bool "Enable legacy fbdev support for your modesetting driver"
>>>>>>>> + depends on DRM
>>>>>>>> + select DRM_KMS_HELPER
>>>>>>>> + select DRM_KMS_FB_HELPER
>>>>>>>> + select FB_SYS_FILLRECT
>>>>>>>> + select FB_SYS_COPYAREA
>>>>>>>> + select FB_SYS_IMAGEBLIT
>>>>>>>> + select FB_SYS_FOPS
>>>>>>>> + select FB_CFB_FILLRECT
>>>>>>>> + select FB_CFB_COPYAREA
>>>>>>>> + select FB_CFB_IMAGEBLIT
>>>>>>>> + default y
>>>>>>>> + help
>>>>>>>> + Choose this option if you have a need for the legacy fbdev
>>>>>>>> + support. Note that this support also provide the linux console
>>>>>>>> + support on top of your modesetting driver.
>>>>>>>
>>>>>>> Maybe clarify that for linux console support you also need
>>>>>>> CONFIG_FRAMEBUFFER_CONSOLE? fbdev alone isn't enough.
>>>>>>
>>>>>> DRM_KMS_FB_HELPER selects that for us, right?
>>>>>
>>>>> Hm right I've missed that. Reminds me that you need one more patch at the
>>>>> end to remove all the various select DRM_KMS_FB_HELPER from all drm
>>>>> drivers. Otherwise this knob here won't work by default if you e.g. select
>>>>> radeon. In general we can't mix explicit options with menu entries with a
>>>>> select.
>>>>
>>>> I was trying that out. Removing DRM_KMS_FB_HELPER and having
>>>> DRM_FBDEV_EMULATION disabled breaks drivers which use FB stuff internally in
>>>> their respective xyz_fbdev.c files.
>>>
>>> But with the stubbed out functions that should work, right? Why doesn't
>>> it?
>>
>> There are still calls to functions from fb core like fb_set_suspend and
>> register_framebuffer which aren't covered by the drm fb helper functions.
>
> Hm, sounds like we need another patch to stub out fb_set_suspend when
> fbdev isn't enabled. Is there anything else?
There are a handful of fb core functions which are called by drm drivers:
fb_alloc_cmap/fb_dealloc_cmap
fb_sys_read/fb_sys_write
register_framebuffer/unregister_framebuffer/unlink_framebuffer/
remove_conflicting_framebuffers
fb_set_suspend
fb_deferred_io_init/fb_deferred_io_cleanup
framebuffer_alloc/framebuffer_release
>
>>>> Are you saying that we should remove DRM_KMS_FB_HELPER for such drivers and
>>>> replace them with 'select DRM_FBDEV_EMULATION'?
>>>>
>>>> Another option would be to provide #ifdef DRM_FBDEV_EMULATION wrap-arounds
>>>> for fb related function calls/declarations in each driver, something that's
>>>> already done for i915 and msm drivers.
>>>
>>> The problem with the patch as-is the massive amounts of selects the FB
>>> helper still has. We need to get rid of them so that when you disable
>>> fbdev emulation you can indeed disable fbcon and the entire fbdev
>>> subsystem. I've thought that remove the hidden symbol DRM_KMS_FB_HELPER
>>> and moving all the selects to DRM_FBDEV_EMULATION should work out? If that
>>> doesn't work we need to look again how to better stub things out I think.
>>
>> That's true. Also, as Jani pointed out, maybe it isn't the best idea to make
>> every kms driver select DRM_FBDEV_EMULATION?
>>
>> Maybe the drivers that are currently built with fbdev emulation by default
>> can add a 'depends on DRM_FBDEV_EMULATION'? Since the config defaults to y,
>> the drivers should run as is. Later, we could take up each driver and build
>> the fb stuff only when DRM_FBDEV_EMULATION is set, like how we do for i915
>> and msm?
>
> Yeah we definitely can't mix select with a user-visible option. I think we
> just need to fix up the remaining functions and create stubs for them if
> needed and then drop all the selects. Well in DRM_FBDEV_EMULATION we
> should still select for fbcon since otherwise tons of bug reports about
> "where is my fbcon with kms?".
I'll give this a try. Although, it would be a better idea to make the
drivers not call these at all when fbdev emulation isn't asked for. With
the stubs, if someone does try to use the driver with
DRM_FBDEV_EMULATION not set, the worst that'll happen would be that the
driver fails to probe. Which isn't so bad.
Archit
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply
* Re: [PATCH] staging: sm750fb: braces, indents, spaces fix
From: Dan Carpenter @ 2015-03-13 7:45 UTC (permalink / raw)
To: Ragavendra BN
Cc: sudipm.mukherjee, teddy.wang, gregkh, linux-fbdev, devel,
linux-kernel
In-Reply-To: <20150313061127.GA30820@localhost.localdomain>
On Thu, Mar 12, 2015 at 11:11:27PM -0700, Ragavendra BN wrote:
> This patch removes the braces for the single line if statement. It fixes
> the indent positions correctly. It fixes the spaces appropriately making the code give no
> warnings by the checpath.pl script check. Please accept.
^^^^^^^^^^^^^^
Don't put this in the changelog.
>
> Signed-off-by: Ragavendra BN <ragavendra.bn@gmail.com>
Is your name *really* BN?
regards,
dan carpenter
^ permalink raw reply
* related to frame buffer rotation to 180 degree
From: Jaymin Dabhi @ 2015-03-13 8:53 UTC (permalink / raw)
To: linux-fbdev
Hello,
I using i/MX6Q processor with Linux Kernel 3.0.35 version with 3.5 inch
RGB type ORTUSTECH LCD display.
I want to rotate my LCD screen to 180 degree from current position.
I tried out to pass digits by use of echo to fb0 and fbcon in
/sys/class/graphics/fb0 and fbcon but still nothing happen, I can do
mirror my display but not rotate.
I write full details, what I had done for rotation at below link, please
refer it once for full details
https://community.freescale.com/thread/346492
Help me about this to solve this issue, it will benefit me a lot.
--
Thanks and Regards,
JAYMIN DABHI
Embedded Engineer
Delta Embedded Solutions Pvt. Ltd.
BAT House, 720/10 Navi Peth,
Plot-985, off LBS Road,
Pune - 411030. India.
Tel: +91 (20) 2453 0811
www.deltaembedded.in
This email message is for the sole use of the intended recipient(s) and
may contain confidential and privileged information.Any unauthorized
review, use, disclosure or distribution is prohibited.If you are not
the intended recipient, please contact the sender by reply email and
destroy all copies of the original message.
DISCLAIMER
This email message including any attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
The opinions / views expressed in the mail or its attachments are those of the sender, and do not necessarily reflect the opinions of the sender's organization.
Although we have taken every reasonable care to ensure the mail is free of viruses / computer threats, the responsibility of ensuring security lies with the recipient. The sender, sending organization and ISP cannot accept responsibility or liability for any damage arising from the use of this email or its attachments.
^ permalink raw reply
* Re: [RFC 1/6] drm: Add top level Kconfig option for DRM fbdev emulation
From: Daniel Vetter @ 2015-03-13 9:06 UTC (permalink / raw)
To: Archit Taneja
Cc: benjamin.gaignard, linux-arm-msm, linux-kernel, linux-fbdev,
tomi.valkeinen, dri-devel, treding
In-Reply-To: <550282C3.10903@codeaurora.org>
On Fri, Mar 13, 2015 at 11:55:07AM +0530, Archit Taneja wrote:
>
>
> On 03/11/2015 08:47 PM, Daniel Vetter wrote:
> >On Wed, Mar 11, 2015 at 01:51:02PM +0530, Archit Taneja wrote:
> >>
> >>
> >>On 03/10/2015 05:47 PM, Daniel Vetter wrote:
> >>>On Tue, Mar 10, 2015 at 03:52:41PM +0530, Archit Taneja wrote:
> >>>>On 03/10/2015 03:35 PM, Daniel Vetter wrote:
> >>>>>On Tue, Mar 10, 2015 at 03:22:49PM +0530, Archit Taneja wrote:
> >>>>>>On 03/10/2015 03:17 PM, Daniel Vetter wrote:
> >>>>>>>On Tue, Mar 10, 2015 at 03:11:28PM +0530, Archit Taneja wrote:
> >>>>>>>>diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
> >>>>>>>>index 151a050..38f83a0 100644
> >>>>>>>>--- a/drivers/gpu/drm/Kconfig
> >>>>>>>>+++ b/drivers/gpu/drm/Kconfig
> >>>>>>>>@@ -40,6 +40,24 @@ config DRM_KMS_FB_HELPER
> >>>>>>>> help
> >>>>>>>> FBDEV helpers for KMS drivers.
> >>>>>>>>
> >>>>>>>>+config DRM_FBDEV_EMULATION
> >>>>>>>>+ bool "Enable legacy fbdev support for your modesetting driver"
> >>>>>>>>+ depends on DRM
> >>>>>>>>+ select DRM_KMS_HELPER
> >>>>>>>>+ select DRM_KMS_FB_HELPER
> >>>>>>>>+ select FB_SYS_FILLRECT
> >>>>>>>>+ select FB_SYS_COPYAREA
> >>>>>>>>+ select FB_SYS_IMAGEBLIT
> >>>>>>>>+ select FB_SYS_FOPS
> >>>>>>>>+ select FB_CFB_FILLRECT
> >>>>>>>>+ select FB_CFB_COPYAREA
> >>>>>>>>+ select FB_CFB_IMAGEBLIT
> >>>>>>>>+ default y
> >>>>>>>>+ help
> >>>>>>>>+ Choose this option if you have a need for the legacy fbdev
> >>>>>>>>+ support. Note that this support also provide the linux console
> >>>>>>>>+ support on top of your modesetting driver.
> >>>>>>>
> >>>>>>>Maybe clarify that for linux console support you also need
> >>>>>>>CONFIG_FRAMEBUFFER_CONSOLE? fbdev alone isn't enough.
> >>>>>>
> >>>>>>DRM_KMS_FB_HELPER selects that for us, right?
> >>>>>
> >>>>>Hm right I've missed that. Reminds me that you need one more patch at the
> >>>>>end to remove all the various select DRM_KMS_FB_HELPER from all drm
> >>>>>drivers. Otherwise this knob here won't work by default if you e.g. select
> >>>>>radeon. In general we can't mix explicit options with menu entries with a
> >>>>>select.
> >>>>
> >>>>I was trying that out. Removing DRM_KMS_FB_HELPER and having
> >>>>DRM_FBDEV_EMULATION disabled breaks drivers which use FB stuff internally in
> >>>>their respective xyz_fbdev.c files.
> >>>
> >>>But with the stubbed out functions that should work, right? Why doesn't
> >>>it?
> >>
> >>There are still calls to functions from fb core like fb_set_suspend and
> >>register_framebuffer which aren't covered by the drm fb helper functions.
> >
> >Hm, sounds like we need another patch to stub out fb_set_suspend when
> >fbdev isn't enabled. Is there anything else?
>
> There are a handful of fb core functions which are called by drm drivers:
>
> fb_alloc_cmap/fb_dealloc_cmap
>
> fb_sys_read/fb_sys_write
>
> register_framebuffer/unregister_framebuffer/unlink_framebuffer/
> remove_conflicting_framebuffers
>
> fb_set_suspend
>
> fb_deferred_io_init/fb_deferred_io_cleanup
>
> framebuffer_alloc/framebuffer_release
Hm yeah that's somewhat annoying indeed. What about the following:
1. We move all the #include <linux/fb.h> from drivers into drm_fb_helper.h
2. Then we add stubs for these functions in drm_fb_helper.h, like this
#if defined(CONFIG_FB)
#include <linux/fb.h>
#else
/* static inline stubs for all the fb stuff used by kms drivers */
#endif
Imo this makes sense since kms drivers really have a bit a special
situation with fbdev. They're not full-blown fbdev drivers and can be
useful fully without fbdev.
What do you think?
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply
* Re: [RFC 1/6] drm: Add top level Kconfig option for DRM fbdev emulation
From: Jani Nikula @ 2015-03-13 9:46 UTC (permalink / raw)
To: Archit Taneja
Cc: linux-kernel, linux-arm-msm, daniel, robdclark, airlied, treding,
p.zabel, benjamin.gaignard, dri-devel, linux-fbdev,
tomi.valkeinen
In-Reply-To: <20150313090651.GZ3800@phenom.ffwll.local>
On Fri, 13 Mar 2015, Daniel Vetter <daniel@ffwll.ch> wrote:
> #if defined(CONFIG_FB)
> #include <linux/fb.h>
> #else
Side note, #if IS_ENABLED(CONFIG_FB)
BR,
Jani.
--
Jani Nikula, Intel Open Source Technology Center
^ permalink raw reply
* re: fbdev: sh_mobile_lcdc: Implement overlays support
From: Dan Carpenter @ 2015-03-13 10:07 UTC (permalink / raw)
To: linux-fbdev
Hello Laurent Pinchart,
The patch c5deac3c9b22: "fbdev: sh_mobile_lcdc: Implement overlays
support" from Dec 12, 2011, leads to the following static checker
warning:
drivers/video/fbdev/sh_mobile_lcdcfb.c:1471 overlay_rop3_store()
warn: bool comparison is always 'false'
drivers/video/fbdev/sh_mobile_lcdcfb.c
1455 static ssize_t
1456 overlay_rop3_store(struct device *dev, struct device_attribute *attr,
1457 const char *buf, size_t count)
1458 {
1459 struct fb_info *info = dev_get_drvdata(dev);
1460 struct sh_mobile_lcdc_overlay *ovl = info->par;
1461 unsigned int rop3;
1462 char *endp;
1463
1464 rop3 = !!simple_strtoul(buf, &endp, 10);
^^
rop3 is true/false.
1465 if (isspace(*endp))
1466 endp++;
1467
1468 if (endp - buf != count)
1469 return -EINVAL;
1470
1471 if (rop3 > 255)
^^^^^^^^^^
This condition is never true. Should we just delete it?
1472 return -EINVAL;
1473
1474 if (ovl->rop3 != rop3) {
1475 ovl->rop3 = rop3;
1476
1477 if (ovl->mode = LCDC_OVERLAY_ROP3 && ovl->enabled)
1478 sh_mobile_lcdc_overlay_setup(ovl);
1479 }
1480
1481 return count;
1482 }
regards,
dan carpenter
^ permalink raw reply
* Re: related to frame buffer rotation to 180 degree
From: Geert Uytterhoeven @ 2015-03-13 10:12 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <5502A2A9.4080204@deltaembedded.in>
On Fri, Mar 13, 2015 at 9:41 AM, Jaymin Dabhi
<jaymin.dabhi@deltaembedded.in> wrote:
> I using i/MX6Q processor with Linux Kernel 3.0.35 version with 3.5 inch RGB
> type ORTUSTECH LCD display.
>
> I want to rotate my LCD screen to 180 degree from current position.
> I tried out to pass digits by use of echo to fb0 and fbcon in
> /sys/class/graphics/fb0 and fbcon but still nothing happen, I can do mirror
> my display but not rotate.
You do have FRAMEBUFFER_CONSOLE_ROTATION=y in your .config?
Note that rotation is only done for text console output.
Graphical applications have to take care of rotation theirselves.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply
* Re: [RFC 1/6] drm: Add top level Kconfig option for DRM fbdev emulation
From: Archit Taneja @ 2015-03-13 11:12 UTC (permalink / raw)
To: treding, p.zabel, benjamin.gaignard, daniel
Cc: linux-fbdev, linux-arm-msm, linux-kernel, dri-devel,
tomi.valkeinen
In-Reply-To: <20150313090651.GZ3800@phenom.ffwll.local>
On 03/13/2015 02:36 PM, Daniel Vetter wrote:
> On Fri, Mar 13, 2015 at 11:55:07AM +0530, Archit Taneja wrote:
>>
>>
>> On 03/11/2015 08:47 PM, Daniel Vetter wrote:
>>> On Wed, Mar 11, 2015 at 01:51:02PM +0530, Archit Taneja wrote:
>>>>
>>>>
>>>> On 03/10/2015 05:47 PM, Daniel Vetter wrote:
>>>>> On Tue, Mar 10, 2015 at 03:52:41PM +0530, Archit Taneja wrote:
>>>>>> On 03/10/2015 03:35 PM, Daniel Vetter wrote:
>>>>>>> On Tue, Mar 10, 2015 at 03:22:49PM +0530, Archit Taneja wrote:
>>>>>>>> On 03/10/2015 03:17 PM, Daniel Vetter wrote:
>>>>>>>>> On Tue, Mar 10, 2015 at 03:11:28PM +0530, Archit Taneja wrote:
>>>>>>>>>> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
>>>>>>>>>> index 151a050..38f83a0 100644
>>>>>>>>>> --- a/drivers/gpu/drm/Kconfig
>>>>>>>>>> +++ b/drivers/gpu/drm/Kconfig
>>>>>>>>>> @@ -40,6 +40,24 @@ config DRM_KMS_FB_HELPER
>>>>>>>>>> help
>>>>>>>>>> FBDEV helpers for KMS drivers.
>>>>>>>>>>
>>>>>>>>>> +config DRM_FBDEV_EMULATION
>>>>>>>>>> + bool "Enable legacy fbdev support for your modesetting driver"
>>>>>>>>>> + depends on DRM
>>>>>>>>>> + select DRM_KMS_HELPER
>>>>>>>>>> + select DRM_KMS_FB_HELPER
>>>>>>>>>> + select FB_SYS_FILLRECT
>>>>>>>>>> + select FB_SYS_COPYAREA
>>>>>>>>>> + select FB_SYS_IMAGEBLIT
>>>>>>>>>> + select FB_SYS_FOPS
>>>>>>>>>> + select FB_CFB_FILLRECT
>>>>>>>>>> + select FB_CFB_COPYAREA
>>>>>>>>>> + select FB_CFB_IMAGEBLIT
>>>>>>>>>> + default y
>>>>>>>>>> + help
>>>>>>>>>> + Choose this option if you have a need for the legacy fbdev
>>>>>>>>>> + support. Note that this support also provide the linux console
>>>>>>>>>> + support on top of your modesetting driver.
>>>>>>>>>
>>>>>>>>> Maybe clarify that for linux console support you also need
>>>>>>>>> CONFIG_FRAMEBUFFER_CONSOLE? fbdev alone isn't enough.
>>>>>>>>
>>>>>>>> DRM_KMS_FB_HELPER selects that for us, right?
>>>>>>>
>>>>>>> Hm right I've missed that. Reminds me that you need one more patch at the
>>>>>>> end to remove all the various select DRM_KMS_FB_HELPER from all drm
>>>>>>> drivers. Otherwise this knob here won't work by default if you e.g. select
>>>>>>> radeon. In general we can't mix explicit options with menu entries with a
>>>>>>> select.
>>>>>>
>>>>>> I was trying that out. Removing DRM_KMS_FB_HELPER and having
>>>>>> DRM_FBDEV_EMULATION disabled breaks drivers which use FB stuff internally in
>>>>>> their respective xyz_fbdev.c files.
>>>>>
>>>>> But with the stubbed out functions that should work, right? Why doesn't
>>>>> it?
>>>>
>>>> There are still calls to functions from fb core like fb_set_suspend and
>>>> register_framebuffer which aren't covered by the drm fb helper functions.
>>>
>>> Hm, sounds like we need another patch to stub out fb_set_suspend when
>>> fbdev isn't enabled. Is there anything else?
>>
>> There are a handful of fb core functions which are called by drm drivers:
>>
>> fb_alloc_cmap/fb_dealloc_cmap
>>
>> fb_sys_read/fb_sys_write
>>
>> register_framebuffer/unregister_framebuffer/unlink_framebuffer/
>> remove_conflicting_framebuffers
>>
>> fb_set_suspend
>>
>> fb_deferred_io_init/fb_deferred_io_cleanup
>>
>> framebuffer_alloc/framebuffer_release
>
> Hm yeah that's somewhat annoying indeed. What about the following:
> 1. We move all the #include <linux/fb.h> from drivers into drm_fb_helper.h
>
> 2. Then we add stubs for these functions in drm_fb_helper.h, like this
>
> #if defined(CONFIG_FB)
> #include <linux/fb.h>
> #else
>
> /* static inline stubs for all the fb stuff used by kms drivers */
> #endif
>
> Imo this makes sense since kms drivers really have a bit a special
> situation with fbdev. They're not full-blown fbdev drivers and can be
> useful fully without fbdev.
>
> What do you think?
This looks good! I'll give it a try.
Archit
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply
* Re: fbdev: sh_mobile_lcdc: Implement overlays support
From: Geert Uytterhoeven @ 2015-03-13 15:45 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <20150313100737.GA1984@mwanda>
On Fri, Mar 13, 2015 at 11:07 AM, Dan Carpenter
<dan.carpenter@oracle.com> wrote:
> The patch c5deac3c9b22: "fbdev: sh_mobile_lcdc: Implement overlays
> support" from Dec 12, 2011, leads to the following static checker
> warning:
>
> drivers/video/fbdev/sh_mobile_lcdcfb.c:1471 overlay_rop3_store()
> warn: bool comparison is always 'false'
>
> drivers/video/fbdev/sh_mobile_lcdcfb.c
> 1455 static ssize_t
> 1456 overlay_rop3_store(struct device *dev, struct device_attribute *attr,
> 1457 const char *buf, size_t count)
> 1458 {
> 1459 struct fb_info *info = dev_get_drvdata(dev);
> 1460 struct sh_mobile_lcdc_overlay *ovl = info->par;
> 1461 unsigned int rop3;
> 1462 char *endp;
> 1463
> 1464 rop3 = !!simple_strtoul(buf, &endp, 10);
> ^^
> rop3 is true/false.
>
> 1465 if (isspace(*endp))
> 1466 endp++;
> 1467
> 1468 if (endp - buf != count)
> 1469 return -EINVAL;
> 1470
> 1471 if (rop3 > 255)
> ^^^^^^^^^^
> This condition is never true. Should we just delete it?
Documentation/ABI/testing/sysfs-devices-platform-sh_mobile_lcdc_fb:
"Values range from 0 to 255".
So it looks like the "!!" should be dropped instead.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply
* Re: [PATCH 7/8] fbdev: ssd1307fb: Add sysfs handles to expose contrast and dim setting to userspace.
From: Thomas Niederprüm @ 2015-03-13 19:21 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: Maxime Ripard, linux-fbdev, plagnioj, linux-kernel
In-Reply-To: <54FECC2F.8080804@ti.com>
Am Tue, 10 Mar 2015 12:49:19 +0200
schrieb Tomi Valkeinen <tomi.valkeinen@ti.com>:
> On 09/02/15 10:52, Maxime Ripard wrote:
> > On Sat, Feb 07, 2015 at 05:42:44PM +0100, Thomas Niederprüm wrote:
> >>>> +static struct device_attribute device_attrs[] = {
> >>>> + __ATTR(contrast, S_IRUGO|S_IWUSR, show_contrast,
> >>>> store_contrast),
> >>>> + __ATTR(dim, S_IRUGO|S_IWUSR, show_dim, store_dim),
> >>>> +
> >>>> +};
> >>>> +
> >>>
> >>> I would have thought this was something accessible through the
> >>> framebuffer ioctl.
> >>>
> >>> Apparently it's not, at least for the contrast, so maybe it
> >>> should be added there, instead of doing it for a single driver?
> >>
> >> I think the contrast setting for an OLED display is much like the
> >> backlight setting for LCD panel. Since there is also no ioctl to
> >> set the backlight of an LCD I wonder if the contrast of an OLED
> >> should have one.
> >
> > It's too much of framebuffer interface debate for me here. Tomi?
>
> We have backlight and contrast already in backlight-class and
> lcd-class (drivers/video/backlight/backlight.c and
> drivers/video/backlight/lcd.c). Are those something that could be
> used here instead of custom sysfs files?
I just gave the backlight-class a try and it works like a charm. I
will include it in v4 and drop the sysfs handles instead. Thanks for the
hint!
Thomas
^ permalink raw reply
* Re: [PATCH 5/8] fbdev: ssd1307fb: Add module parameter bitsperpixel.
From: Thomas Niederprüm @ 2015-03-13 19:25 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: Maxime Ripard, linux-fbdev, plagnioj, linux-kernel
In-Reply-To: <54FECB5D.1020908@ti.com>
Am Tue, 10 Mar 2015 12:45:49 +0200
schrieb Tomi Valkeinen <tomi.valkeinen@ti.com>:
> On 14/02/15 17:54, Maxime Ripard wrote:
> > On Sat, Feb 07, 2015 at 05:05:03PM +0100, Thomas Niederprüm wrote:
> >> Am Sat, 7 Feb 2015 12:20:43 +0100
> >> schrieb Maxime Ripard <maxime.ripard@free-electrons.com>:
> >>
> >>> On Fri, Feb 06, 2015 at 11:28:11PM +0100, niederp@physik.uni-kl.de
> >>> wrote:
> >>>> From: Thomas Niederprüm <niederp@physik.uni-kl.de>
> >>>>
> >>>> This patch adds a module parameter 'bitsperpixel' to adjust the
> >>>> colordepth of the framebuffer. All values >1 will result in
> >>>> memory map of the requested color depth. However only the MSB of
> >>>> each pixel will be sent to the device. The framebuffer
> >>>> identifies itself as a grayscale display with the specified
> >>>> depth.
> >>>
> >>> I'm not sure this is the right thing to do.
> >>>
> >>> The bits per pixel for this display is rightfully defined, used
> >>> and reported to the userspace, why would you want to change that?
> >>
> >> You are right of course. The display is 1bpp and it reports to be 1
> >> bpp. The problem is that there is almost no userspace library that
> >> can handle 1 bit framebuffers correctly. So it is nice if the
> >> framebuffer (optionally) can expose itself as 8 bits per pixel
> >> grayscale to the userspace program. As an example this allows to
> >> run DirectFB on the framebuffer, which is not possible out of the
> >> box for 1bpp.
> >>
> >> Also note that if do not set the module parameter at load time
> >> the framebuffer will be 1bpp. So you have to actively set that
> >> module parameter to make the framebuffer pretend to be more than
> >> 1bpp.
> >>
> >> In any case I don't cling to that patch, I just thought it was a
> >> nice feature.
> >
> > I'd say that the right fix would be to patch DirectFB, instead of
> > faking that in the kernel.
> >
> > But again, that's probably Tomi's call, not mine.
>
> Right, I'm not thrilled =). I don't think it's a good idea to lie to
> the userspace (except when fixing regressions).
Ok, since Maxime and you agree that this is not desirable I will drop
that patch in v4.
Thomas
^ permalink raw reply
* Re: [PATCH 4/8] fbdev: ssd1307fb: Use vmalloc to allocate video memory.
From: Thomas Niederprüm @ 2015-03-13 21:31 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: Maxime Ripard, linux-fbdev, plagnioj, linux-kernel
In-Reply-To: <54FED559.2030506@ti.com>
Am Tue, 10 Mar 2015 13:28:25 +0200
schrieb Tomi Valkeinen <tomi.valkeinen@ti.com>:
> On 14/02/15 16:22, Thomas Niederprüm wrote:
> > Am Thu, 12 Feb 2015 16:11:21 +0100
> > schrieb Maxime Ripard <maxime.ripard@free-electrons.com>:
> >
> >> On Sat, Feb 07, 2015 at 04:35:41PM +0100, Thomas Niederprüm wrote:
> >>> Am Sat, 7 Feb 2015 12:18:21 +0100
> >>> schrieb Maxime Ripard <maxime.ripard@free-electrons.com>:
> >>>
> >>>> Hi,
> >>>>
> >>>> On Fri, Feb 06, 2015 at 11:28:10PM +0100,
> >>>> niederp@physik.uni-kl.de wrote:
> >>>>> From: Thomas Niederprüm <niederp@physik.uni-kl.de>
> >>>>>
> >>>>> It makes sense to use vmalloc to allocate the video buffer
> >>>>> since it has to be page aligned memory for using it with mmap.
> >>>>
> >>>> Please wrap your commit log at 80 chars.
> >>>
> >>> I'll try to do so in future, sorry for that.
> >>>
> >>>>
> >>>> It looks like there's numerous fbdev drivers using this
> >>>> (especially since you copy pasted that code, without mentionning
> >>>> it).
> >>>
> >>> Yes, I should have mentioned that in the commit message. As
> >>> implicitly indicated in the cover letter the rvmalloc() and
> >>> rvfree() are copy pasted from the vfb driver. Honestly, I didn't
> >>> give this one too much thought. It seemed a viable solution to the
> >>> mmap problem. For a bit more history on that, see my comment
> >>> below.
> >>>
> >>>>
> >>>> That should be turned into an allocator so that drivers all get
> >>>> this right.
> >>>>
> >>>>> Also deffered io seems buggy in combination with kmalloc'ed
> >>>>> memory (crash on unloading the module).
> >>>>
> >>>> And maybe that's the real issue to fix.
> >>>
> >>> The problem is solved by using vmalloc ;)
> >>
> >> Yep, but why do you need to mark the reserved pages?
> >>
> >> ...
> >
> > As far as I understood mmaped memory is marked as userspace memory
> > in the page table and is therefore subject to swapping. The pages
> > are marked reserved to make clear that this memory can not be
> > swapped and thus lock the pages in memory. See discussions [0,1,2].
>
> Why is it a problem if it is swapped? Only CPU uses the memory, as far
> as I can see.
It seems to be no problem at all. I was copying the allocation code
from the vfb driver. The memory is no longer marked as reserved from
v2 on.
> Also, isn't doing __pa() for the memory returned by vmalloc plain
> wrong?
> What was the crash about when using kmalloc? It would be good to fix
> defio, as I don't see why it should not work with kmalloced memory.
The main challenge here is that the memory handed to userspace upon
mmap call needs to be page aligned. The memory returned by kmalloc has
no such alignment, but the pointer presented to the userspace program
gets aligned to next page boundary. It's not clear to me whether there
is an easy way to obtain page aligned kmalloc memory. Memory
allocated by vmalloc on the other hand is always aligned to page
boundaries. This is why I chose to go for vmalloc.
Thomas
^ permalink raw reply
* Re: [PATCH] staging: sm750fb: braces, indents, spaces fix
From: Greg KH @ 2015-03-14 8:39 UTC (permalink / raw)
To: Ragavendra
Cc: Dan Carpenter, Sudip Mukherjee, teddy.wang, linux-fbdev, devel,
linux-kernel
In-Reply-To: <CAPBgb4=np7Bs=sMTZHpZZ1Ef7uriUDYjjz6Y7+49Vs1rOVo59w@mail.gmail.com>
On Fri, Mar 13, 2015 at 09:01:48AM -0700, Ragavendra wrote:
> BN is my initial, should it be expanded?
Yes.
^ permalink raw reply
* [PATCH] video: fbdev: sh_mobile_lcdcfb: Fix ROP3 sysfs attribute parsing
From: Laurent Pinchart @ 2015-03-14 15:38 UTC (permalink / raw)
To: linux-fbdev
The ROP3 attribute is expressed as an integer in the 0-255 range. Remove
the wrong conversion to boolean when parsing it.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
drivers/video/fbdev/sh_mobile_lcdcfb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.c b/drivers/video/fbdev/sh_mobile_lcdcfb.c
index d3013cd9f976..23421ec1c4e4 100644
--- a/drivers/video/fbdev/sh_mobile_lcdcfb.c
+++ b/drivers/video/fbdev/sh_mobile_lcdcfb.c
@@ -1461,7 +1461,7 @@ overlay_rop3_store(struct device *dev, struct device_attribute *attr,
unsigned int rop3;
char *endp;
- rop3 = !!simple_strtoul(buf, &endp, 10);
+ rop3 = simple_strtoul(buf, &endp, 10);
if (isspace(*endp))
endp++;
--
Regards,
Laurent Pinchart
^ permalink raw reply related
* Re: [PATCH 1/2] vt: add cursor blink interval escape sequence
From: Scot Doyle @ 2015-03-14 17:48 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Jiri Slaby, Tomi Valkeinen, Jean-Christophe Plagniol-Villard,
Michael Kerrisk, Pavel Machek, Geert Uytterhoeven,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
linux-api-u79uwXL29TY76Z2rM5mHXA,
linux-man-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <alpine.LNX.2.11.1502271911380.4248@localhost>
On Fri, 27 Feb 2015, Scot Doyle wrote:
> Add an escape sequence to specify the current console's cursor blink
> interval. The interval is specified as a number of milliseconds until
> the next cursor display state toggle, from 50 to 65535. /proc/loadavg
> did not show a difference with a one msec interval, but the lower
> bound is set to 50 msecs since slower hardware wasn't tested.
>
> Store the interval in the vc_data structure for later access by fbcon,
> initializing the value to fbcon's current hardcoded value of 200 msecs.
>
> Signed-off-by: Scot Doyle <lkml14@scotdoyle.com>
> Acked-by: Pavel Machek <pavel@ucw.cz>
Hi Greg, sorry about your backlog. Is it too soon for a ping?
> ---
> drivers/tty/vt/vt.c | 9 +++++++++
> include/linux/console_struct.h | 1 +
> 2 files changed, 10 insertions(+)
>
> diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
> index 6e00572..ab1f173 100644
> --- a/drivers/tty/vt/vt.c
> +++ b/drivers/tty/vt/vt.c
> @@ -135,6 +135,7 @@ const struct consw *conswitchp;
> */
> #define DEFAULT_BELL_PITCH 750
> #define DEFAULT_BELL_DURATION (HZ/8)
> +#define DEFAULT_CURSOR_BLINK_MS 200
>
> struct vc vc_cons [MAX_NR_CONSOLES];
>
> @@ -1590,6 +1591,13 @@ static void setterm_command(struct vc_data *vc)
> case 15: /* activate the previous console */
> set_console(last_console);
> break;
> + case 16: /* set cursor blink duration in msec */
> + if (vc->vc_npar >= 1 && vc->vc_par[1] >= 50 &&
> + vc->vc_par[1] <= USHRT_MAX)
> + vc->vc_cur_blink_ms = vc->vc_par[1];
> + else
> + vc->vc_cur_blink_ms = DEFAULT_CURSOR_BLINK_MS;
> + break;
> }
> }
>
> @@ -1717,6 +1725,7 @@ static void reset_terminal(struct vc_data *vc, int do_clear)
>
> vc->vc_bell_pitch = DEFAULT_BELL_PITCH;
> vc->vc_bell_duration = DEFAULT_BELL_DURATION;
> + vc->vc_cur_blink_ms = DEFAULT_CURSOR_BLINK_MS;
>
> gotoxy(vc, 0, 0);
> save_cur(vc);
> diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h
> index e859c98..e329ee2 100644
> --- a/include/linux/console_struct.h
> +++ b/include/linux/console_struct.h
> @@ -104,6 +104,7 @@ struct vc_data {
> unsigned int vc_resize_user; /* resize request from user */
> unsigned int vc_bell_pitch; /* Console bell pitch */
> unsigned int vc_bell_duration; /* Console bell duration */
> + unsigned short vc_cur_blink_ms; /* Cursor blink duration */
> struct vc_data **vc_display_fg; /* [!] Ptr to var holding fg console for this display */
> struct uni_pagedir *vc_uni_pagedir;
> struct uni_pagedir **vc_uni_pagedir_loc; /* [!] Location of uni_pagedir variable for this console */
> --
> 2.3.0
>
^ permalink raw reply
* Re: [PATCH 4/8] fbdev: ssd1307fb: Use vmalloc to allocate video memory.
From: Geert Uytterhoeven @ 2015-03-14 22:02 UTC (permalink / raw)
To: Thomas Niederprüm
Cc: Tomi Valkeinen, Maxime Ripard, Linux Fbdev development list,
Jean-Christophe PLAGNIOL-VILLARD, linux-kernel@vger.kernel.org
In-Reply-To: <20150313223128.2a3a682e@maestro.intranet>
On Fri, Mar 13, 2015 at 10:31 PM, Thomas Niederprüm
<niederp@physik.uni-kl.de> wrote:
> Am Tue, 10 Mar 2015 13:28:25 +0200
> schrieb Tomi Valkeinen <tomi.valkeinen@ti.com>:
>> Also, isn't doing __pa() for the memory returned by vmalloc plain
>> wrong?
>
>> What was the crash about when using kmalloc? It would be good to fix
>> defio, as I don't see why it should not work with kmalloced memory.
>
> The main challenge here is that the memory handed to userspace upon
> mmap call needs to be page aligned. The memory returned by kmalloc has
> no such alignment, but the pointer presented to the userspace program
> gets aligned to next page boundary. It's not clear to me whether there
> is an easy way to obtain page aligned kmalloc memory. Memory
> allocated by vmalloc on the other hand is always aligned to page
> boundaries. This is why I chose to go for vmalloc.
__get_free_pages()?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply
* Re: [PATCH] video: fbdev: sh_mobile_lcdcfb: Fix ROP3 sysfs attribute parsing
From: Geert Uytterhoeven @ 2015-03-15 9:32 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <1426347519-2541-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com>
On Sat, Mar 14, 2015 at 4:38 PM, Laurent Pinchart
<laurent.pinchart+renesas@ideasonboard.com> wrote:
> The ROP3 attribute is expressed as an integer in the 0-255 range. Remove
> the wrong conversion to boolean when parsing it.
>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply
* [PATCH] staging:sm750fb:Fixed no space and indent warnings
From: Ragavendra Nagraj @ 2015-03-16 0:21 UTC (permalink / raw)
To: sudipm.mukherjee, teddy.wang, gregkh, linux-fbdev, devel,
linux-kernel
This patch fixes the no spaces and indent warnings identified by the
checkpath.pl script for the entire ddk750_chip.c file by using appropriate tab
spaces and indents accordingly.
Signed-off-by: Ragavendra Nagraj <ragavendra.bn@gmail.com>
---
drivers/staging/sm750fb/ddk750_chip.c | 454 ++++++++++++++++-----------------
1 file changed, 227 insertions(+), 227 deletions(-)
diff --git a/drivers/staging/sm750fb/ddk750_chip.c b/drivers/staging/sm750fb/ddk750_chip.c
index b71169e..5c9a118 100644
--- a/drivers/staging/sm750fb/ddk750_chip.c
+++ b/drivers/staging/sm750fb/ddk750_chip.c
@@ -20,22 +20,22 @@ logical_chip_type_t getChipType()
physicalID = devId750;//either 0x718 or 0x750
physicalRev = revId750;
- if (physicalID = 0x718)
- {
- chip = SM718;
- }
- else if (physicalID = 0x750)
- {
- chip = SM750;
+ if (physicalID = 0x718)
+ {
+ chip = SM718;
+ }
+ else if (physicalID = 0x750)
+ {
+ chip = SM750;
/* SM750 and SM750LE are different in their revision ID only. */
if (physicalRev = SM750LE_REVISION_ID){
chip = SM750LE;
}
- }
- else
- {
- chip = SM_UNKNOWN;
- }
+ }
+ else
+ {
+ chip = SM_UNKNOWN;
+ }
return chip;
}
@@ -43,63 +43,63 @@ logical_chip_type_t getChipType()
inline unsigned int twoToPowerOfx(unsigned long x)
{
- unsigned long i;
- unsigned long result = 1;
+ unsigned long i;
+ unsigned long result = 1;
- for (i=1; i<=x; i++)
- result *= 2;
- return result;
+ for (i=1; i<=x; i++)
+ result *= 2;
+ return result;
}
inline unsigned int calcPLL(pll_value_t *pPLL)
{
- return (pPLL->inputFreq * pPLL->M / pPLL->N / twoToPowerOfx(pPLL->OD) / twoToPowerOfx(pPLL->POD));
+ return (pPLL->inputFreq * pPLL->M / pPLL->N / twoToPowerOfx(pPLL->OD) / twoToPowerOfx(pPLL->POD));
}
unsigned int getPllValue(clock_type_t clockType, pll_value_t *pPLL)
{
- unsigned int ulPllReg = 0;
-
- pPLL->inputFreq = DEFAULT_INPUT_CLOCK;
- pPLL->clockType = clockType;
-
- switch (clockType)
- {
- case MXCLK_PLL:
- ulPllReg = PEEK32(MXCLK_PLL_CTRL);
- break;
- case PRIMARY_PLL:
- ulPllReg = PEEK32(PANEL_PLL_CTRL);
- break;
- case SECONDARY_PLL:
- ulPllReg = PEEK32(CRT_PLL_CTRL);
- break;
- case VGA0_PLL:
- ulPllReg = PEEK32(VGA_PLL0_CTRL);
- break;
- case VGA1_PLL:
- ulPllReg = PEEK32(VGA_PLL1_CTRL);
- break;
- }
-
- pPLL->M = FIELD_GET(ulPllReg, PANEL_PLL_CTRL, M);
- pPLL->N = FIELD_GET(ulPllReg, PANEL_PLL_CTRL, N);
- pPLL->OD = FIELD_GET(ulPllReg, PANEL_PLL_CTRL, OD);
- pPLL->POD = FIELD_GET(ulPllReg, PANEL_PLL_CTRL, POD);
-
- return calcPLL(pPLL);
+ unsigned int ulPllReg = 0;
+
+ pPLL->inputFreq = DEFAULT_INPUT_CLOCK;
+ pPLL->clockType = clockType;
+
+ switch (clockType)
+ {
+ case MXCLK_PLL:
+ ulPllReg = PEEK32(MXCLK_PLL_CTRL);
+ break;
+ case PRIMARY_PLL:
+ ulPllReg = PEEK32(PANEL_PLL_CTRL);
+ break;
+ case SECONDARY_PLL:
+ ulPllReg = PEEK32(CRT_PLL_CTRL);
+ break;
+ case VGA0_PLL:
+ ulPllReg = PEEK32(VGA_PLL0_CTRL);
+ break;
+ case VGA1_PLL:
+ ulPllReg = PEEK32(VGA_PLL1_CTRL);
+ break;
+ }
+
+ pPLL->M = FIELD_GET(ulPllReg, PANEL_PLL_CTRL, M);
+ pPLL->N = FIELD_GET(ulPllReg, PANEL_PLL_CTRL, N);
+ pPLL->OD = FIELD_GET(ulPllReg, PANEL_PLL_CTRL, OD);
+ pPLL->POD = FIELD_GET(ulPllReg, PANEL_PLL_CTRL, POD);
+
+ return calcPLL(pPLL);
}
unsigned int getChipClock()
{
- pll_value_t pll;
+ pll_value_t pll;
#if 1
if(getChipType() = SM750LE)
return MHz(130);
#endif
- return getPllValue(MXCLK_PLL, &pll);
+ return getPllValue(MXCLK_PLL, &pll);
}
@@ -110,75 +110,75 @@ unsigned int getChipClock()
*/
void setChipClock(unsigned int frequency)
{
- pll_value_t pll;
- unsigned int ulActualMxClk;
+ pll_value_t pll;
+ unsigned int ulActualMxClk;
#if 1
/* Cheok_0509: For SM750LE, the chip clock is fixed. Nothing to set. */
if (getChipType() = SM750LE)
return;
#endif
- if (frequency != 0)
- {
- /*
- * Set up PLL, a structure to hold the value to be set in clocks.
- */
- pll.inputFreq = DEFAULT_INPUT_CLOCK; /* Defined in CLOCK.H */
- pll.clockType = MXCLK_PLL;
-
- /*
- * Call calcPllValue() to fill up the other fields for PLL structure.
- * Sometime, the chip cannot set up the exact clock required by User.
- * Return value from calcPllValue() gives the actual possible clock.
- */
- ulActualMxClk = calcPllValue(frequency, &pll);
-
- /* Master Clock Control: MXCLK_PLL */
- POKE32(MXCLK_PLL_CTRL, formatPllReg(&pll));
- }
+ if (frequency != 0)
+ {
+ /*
+ * Set up PLL, a structure to hold the value to be set in clocks.
+ */
+ pll.inputFreq = DEFAULT_INPUT_CLOCK; /* Defined in CLOCK.H */
+ pll.clockType = MXCLK_PLL;
+
+ /*
+ * Call calcPllValue() to fill up the other fields for PLL structure.
+ * Sometime, the chip cannot set up the exact clock required by User.
+ * Return value from calcPllValue() gives the actual possible clock.
+ */
+ ulActualMxClk = calcPllValue(frequency, &pll);
+
+ /* Master Clock Control: MXCLK_PLL */
+ POKE32(MXCLK_PLL_CTRL, formatPllReg(&pll));
+ }
}
void setMemoryClock(unsigned int frequency)
{
- unsigned int ulReg, divisor;
+ unsigned int ulReg, divisor;
#if 1
/* Cheok_0509: For SM750LE, the memory clock is fixed. Nothing to set. */
if (getChipType() = SM750LE)
return;
#endif
- if (frequency != 0)
- {
- /* Set the frequency to the maximum frequency that the DDR Memory can take
- which is 336MHz. */
- if (frequency > MHz(336))
- frequency = MHz(336);
-
- /* Calculate the divisor */
- divisor = (unsigned int) roundedDiv(getChipClock(), frequency);
-
- /* Set the corresponding divisor in the register. */
- ulReg = PEEK32(CURRENT_GATE);
- switch(divisor)
- {
- default:
- case 1:
- ulReg = FIELD_SET(ulReg, CURRENT_GATE, M2XCLK, DIV_1);
- break;
- case 2:
- ulReg = FIELD_SET(ulReg, CURRENT_GATE, M2XCLK, DIV_2);
- break;
- case 3:
- ulReg = FIELD_SET(ulReg, CURRENT_GATE, M2XCLK, DIV_3);
- break;
- case 4:
- ulReg = FIELD_SET(ulReg, CURRENT_GATE, M2XCLK, DIV_4);
- break;
- }
-
- setCurrentGate(ulReg);
- }
+ if (frequency != 0)
+ {
+ /* Set the frequency to the maximum frequency that the DDR Memory can take
+ which is 336MHz. */
+ if (frequency > MHz(336))
+ frequency = MHz(336);
+
+ /* Calculate the divisor */
+ divisor = (unsigned int) roundedDiv(getChipClock(), frequency);
+
+ /* Set the corresponding divisor in the register. */
+ ulReg = PEEK32(CURRENT_GATE);
+ switch(divisor)
+ {
+ default:
+ case 1:
+ ulReg = FIELD_SET(ulReg, CURRENT_GATE, M2XCLK, DIV_1);
+ break;
+ case 2:
+ ulReg = FIELD_SET(ulReg, CURRENT_GATE, M2XCLK, DIV_2);
+ break;
+ case 3:
+ ulReg = FIELD_SET(ulReg, CURRENT_GATE, M2XCLK, DIV_3);
+ break;
+ case 4:
+ ulReg = FIELD_SET(ulReg, CURRENT_GATE, M2XCLK, DIV_4);
+ break;
+ }
+
+ setCurrentGate(ulReg);
+ }
}
@@ -192,43 +192,43 @@ void setMemoryClock(unsigned int frequency)
*/
void setMasterClock(unsigned int frequency)
{
- unsigned int ulReg, divisor;
+ unsigned int ulReg, divisor;
#if 1
/* Cheok_0509: For SM750LE, the memory clock is fixed. Nothing to set. */
if (getChipType() = SM750LE)
return;
#endif
- if (frequency != 0)
- {
- /* Set the frequency to the maximum frequency that the SM750 engine can
- run, which is about 190 MHz. */
- if (frequency > MHz(190))
- frequency = MHz(190);
-
- /* Calculate the divisor */
- divisor = (unsigned int) roundedDiv(getChipClock(), frequency);
-
- /* Set the corresponding divisor in the register. */
- ulReg = PEEK32(CURRENT_GATE);
- switch(divisor)
- {
- default:
- case 3:
- ulReg = FIELD_SET(ulReg, CURRENT_GATE, MCLK, DIV_3);
- break;
- case 4:
- ulReg = FIELD_SET(ulReg, CURRENT_GATE, MCLK, DIV_4);
- break;
- case 6:
- ulReg = FIELD_SET(ulReg, CURRENT_GATE, MCLK, DIV_6);
- break;
- case 8:
- ulReg = FIELD_SET(ulReg, CURRENT_GATE, MCLK, DIV_8);
- break;
- }
-
- setCurrentGate(ulReg);
- }
+ if (frequency != 0)
+ {
+ /* Set the frequency to the maximum frequency that the SM750 engine can
+ run, which is about 190 MHz. */
+ if (frequency > MHz(190))
+ frequency = MHz(190);
+
+ /* Calculate the divisor */
+ divisor = (unsigned int) roundedDiv(getChipClock(), frequency);
+
+ /* Set the corresponding divisor in the register. */
+ ulReg = PEEK32(CURRENT_GATE);
+ switch(divisor)
+ {
+ default:
+ case 3:
+ ulReg = FIELD_SET(ulReg, CURRENT_GATE, MCLK, DIV_3);
+ break;
+ case 4:
+ ulReg = FIELD_SET(ulReg, CURRENT_GATE, MCLK, DIV_4);
+ break;
+ case 6:
+ ulReg = FIELD_SET(ulReg, CURRENT_GATE, MCLK, DIV_6);
+ break;
+ case 8:
+ ulReg = FIELD_SET(ulReg, CURRENT_GATE, MCLK, DIV_8);
+ break;
+ }
+
+ setCurrentGate(ulReg);
+ }
}
@@ -249,11 +249,11 @@ unsigned int ddk750_getVMSize()
/* get frame buffer size from GPIO */
reg = FIELD_GET(PEEK32(MISC_CTRL),MISC_CTRL,LOCALMEM_SIZE);
switch(reg){
- case MISC_CTRL_LOCALMEM_SIZE_8M: data = MB(8); break; /* 8 Mega byte */
- case MISC_CTRL_LOCALMEM_SIZE_16M: data = MB(16); break; /* 16 Mega byte */
- case MISC_CTRL_LOCALMEM_SIZE_32M: data = MB(32); break; /* 32 Mega byte */
- case MISC_CTRL_LOCALMEM_SIZE_64M: data = MB(64); break; /* 64 Mega byte */
- default: data = 0;break;
+ case MISC_CTRL_LOCALMEM_SIZE_8M: data = MB(8); break; /* 8 Mega byte */
+ case MISC_CTRL_LOCALMEM_SIZE_16M: data = MB(16); break; /* 16 Mega byte */
+ case MISC_CTRL_LOCALMEM_SIZE_32M: data = MB(32); break; /* 32 Mega byte */
+ case MISC_CTRL_LOCALMEM_SIZE_64M: data = MB(64); break; /* 64 Mega byte */
+ default: data = 0;break;
}
return data;
@@ -391,10 +391,10 @@ int ddk750_initHw(initchip_param_t * pInitParam)
unsigned int absDiff(unsigned int a, unsigned int b)
{
- if ( a > b )
- return(a - b);
- else
- return(b - a);
+ if ( a > b )
+ return(a - b);
+ else
+ return(b - a);
}
#endif
@@ -435,7 +435,7 @@ unsigned int calcPllValue(unsigned int request_orig,pll_value_t *pll)
{3,0,3,8},
};
- /* as sm750 register definition, N located in 2,15 and M located in 1,255 */
+ /* as sm750 register definition, N located in 2,15 and M located in 1,255 */
int N,M,X,d;
int xcnt;
int miniDiff;
@@ -446,11 +446,11 @@ unsigned int calcPllValue(unsigned int request_orig,pll_value_t *pll)
#if 1
if (getChipType() = SM750LE)
- {
- /* SM750LE don't have prgrammable PLL and M/N values to work on.
- Just return the requested clock. */
- return request_orig;
- }
+ {
+ /* SM750LE don't have prgrammable PLL and M/N values to work on.
+ Just return the requested clock. */
+ return request_orig;
+ }
#endif
ret = 0;
@@ -487,7 +487,7 @@ unsigned int calcPllValue(unsigned int request_orig,pll_value_t *pll)
{
unsigned int diff;
tmpClock = pll->inputFreq *M / N / X;
- diff = absDiff(tmpClock,request_orig);
+ diff = absDiff(tmpClock,request_orig);
if(diff < miniDiff)
{
pll->M = M;
@@ -510,104 +510,104 @@ unsigned int ulRequestClk, /* Required pixel clock in Hz unit */
pll_value_t *pPLL /* Structure to hold the value to be set in PLL */
)
{
- unsigned int M, N, OD, POD = 0, diff, pllClk, odPower, podPower;
- unsigned int bestDiff = 0xffffffff; /* biggest 32 bit unsigned number */
+ unsigned int M, N, OD, POD = 0, diff, pllClk, odPower, podPower;
+ unsigned int bestDiff = 0xffffffff; /* biggest 32 bit unsigned number */
unsigned int ret;
/* Init PLL structure to know states */
- pPLL->M = 0;
- pPLL->N = 0;
- pPLL->OD = 0;
- pPLL->POD = 0;
+ pPLL->M = 0;
+ pPLL->N = 0;
+ pPLL->OD = 0;
+ pPLL->POD = 0;
/* Sanity check: None at the moment */
/* Convert everything in Khz range in order to avoid calculation overflow */
- pPLL->inputFreq /= 1000;
- ulRequestClk /= 1000;
+ pPLL->inputFreq /= 1000;
+ ulRequestClk /= 1000;
#ifndef VALIDATION_CHIP
/* The maximum of post divider is 8. */
- for (POD=0; POD<=3; POD++)
+ for (POD=0; POD<=3; POD++)
#endif
- {
+ {
#ifndef VALIDATION_CHIP
- /* MXCLK_PLL does not have post divider. */
- if ((POD > 0) && (pPLL->clockType = MXCLK_PLL))
- break;
+ /* MXCLK_PLL does not have post divider. */
+ if ((POD > 0) && (pPLL->clockType = MXCLK_PLL))
+ break;
#endif
- /* Work out 2 to the power of POD */
- podPower = twoToPowerOfx(POD);
+ /* Work out 2 to the power of POD */
+ podPower = twoToPowerOfx(POD);
- /* OD has only 2 bits [15:14] and its value must between 0 to 3 */
- for (OD=0; OD<=3; OD++)
- {
- /* Work out 2 to the power of OD */
- odPower = twoToPowerOfx(OD);
+ /* OD has only 2 bits [15:14] and its value must between 0 to 3 */
+ for (OD=0; OD<=3; OD++)
+ {
+ /* Work out 2 to the power of OD */
+ odPower = twoToPowerOfx(OD);
#ifdef VALIDATION_CHIP
- if (odPower > 4)
- podPower = 4;
- else
- podPower = odPower;
+ if (odPower > 4)
+ podPower = 4;
+ else
+ podPower = odPower;
#endif
- /* N has 4 bits [11:8] and its value must between 2 and 15.
- The N = 1 will behave differently --> Result is not correct. */
- for (N=2; N<\x15; N++)
- {
- /* The formula for PLL is ulRequestClk = inputFreq * M / N / (2^OD)
- In the following steps, we try to work out a best M value given the others are known.
- To avoid decimal calculation, we use 1000 as multiplier for up to 3 decimal places of accuracy.
- */
- M = ulRequestClk * N * odPower * 1000 / pPLL->inputFreq;
- M = roundedDiv(M, 1000);
-
- /* M field has only 8 bits, reject value bigger than 8 bits */
- if (M < 256)
- {
- /* Calculate the actual clock for a given M & N */
- pllClk = pPLL->inputFreq * M / N / odPower / podPower;
-
- /* How much are we different from the requirement */
- diff = absDiff(pllClk, ulRequestClk);
-
- if (diff < bestDiff)
- {
- bestDiff = diff;
-
- /* Store M and N values */
- pPLL->M = M;
- pPLL->N = N;
- pPLL->OD = OD;
+ /* N has 4 bits [11:8] and its value must between 2 and 15.
+ The N = 1 will behave differently --> Result is not correct. */
+ for (N=2; N<\x15; N++)
+ {
+ /* The formula for PLL is ulRequestClk = inputFreq * M / N / (2^OD)
+ In the following steps, we try to work out a best M value given the others are known.
+ To avoid decimal calculation, we use 1000 as multiplier for up to 3 decimal places of accuracy.
+ */
+ M = ulRequestClk * N * odPower * 1000 / pPLL->inputFreq;
+ M = roundedDiv(M, 1000);
+
+ /* M field has only 8 bits, reject value bigger than 8 bits */
+ if (M < 256)
+ {
+ /* Calculate the actual clock for a given M & N */
+ pllClk = pPLL->inputFreq * M / N / odPower / podPower;
+
+ /* How much are we different from the requirement */
+ diff = absDiff(pllClk, ulRequestClk);
+
+ if (diff < bestDiff)
+ {
+ bestDiff = diff;
+
+ /* Store M and N values */
+ pPLL->M = M;
+ pPLL->N = N;
+ pPLL->OD = OD;
#ifdef VALIDATION_CHIP
- if (OD > 2)
- POD = 2;
- else
- POD = OD;
+ if (OD > 2)
+ POD = 2;
+ else
+ POD = OD;
#endif
- pPLL->POD = POD;
- }
- }
- }
- }
- }
+ pPLL->POD = POD;
+ }
+ }
+ }
+ }
+ }
/* Restore input frequency from Khz to hz unit */
// pPLL->inputFreq *= 1000;
- ulRequestClk *= 1000;
- pPLL->inputFreq = DEFAULT_INPUT_CLOCK; /* Default reference clock */
+ ulRequestClk *= 1000;
+ pPLL->inputFreq = DEFAULT_INPUT_CLOCK; /* Default reference clock */
/* Output debug information */
- //DDKDEBUGPRINT((DISPLAY_LEVEL, "calcPllValue: Requested Frequency = %d\n", ulRequestClk));
- //DDKDEBUGPRINT((DISPLAY_LEVEL, "calcPllValue: Input CLK = %dHz, M=%d, N=%d, OD=%d, POD=%d\n", pPLL->inputFreq, pPLL->M, pPLL->N, pPLL->OD, pPLL->POD));
+ //DDKDEBUGPRINT((DISPLAY_LEVEL, "calcPllValue: Requested Frequency = %d\n", ulRequestClk));
+ //DDKDEBUGPRINT((DISPLAY_LEVEL, "calcPllValue: Input CLK = %dHz, M=%d, N=%d, OD=%d, POD=%d\n", pPLL->inputFreq, pPLL->M, pPLL->N, pPLL->OD, pPLL->POD));
/* Return actual frequency that the PLL can set */
ret = calcPLL(pPLL);
- return ret;
+ return ret;
}
@@ -616,24 +616,24 @@ pll_value_t *pPLL /* Structure to hold the value to be set in PLL */
unsigned int formatPllReg(pll_value_t *pPLL)
{
- unsigned int ulPllReg = 0;
+ unsigned int ulPllReg = 0;
/* Note that all PLL's have the same format. Here, we just use Panel PLL parameter
to work out the bit fields in the register.
On returning a 32 bit number, the value can be applied to any PLL in the calling function.
*/
- ulPllReg - FIELD_SET( 0, PANEL_PLL_CTRL, BYPASS, OFF)
- | FIELD_SET( 0, PANEL_PLL_CTRL, POWER, ON)
- | FIELD_SET( 0, PANEL_PLL_CTRL, INPUT, OSC)
+ ulPllReg + FIELD_SET( 0, PANEL_PLL_CTRL, BYPASS, OFF)
+ | FIELD_SET( 0, PANEL_PLL_CTRL, POWER, ON)
+ | FIELD_SET( 0, PANEL_PLL_CTRL, INPUT, OSC)
#ifndef VALIDATION_CHIP
- | FIELD_VALUE(0, PANEL_PLL_CTRL, POD, pPLL->POD)
+ | FIELD_VALUE(0, PANEL_PLL_CTRL, POD, pPLL->POD)
#endif
- | FIELD_VALUE(0, PANEL_PLL_CTRL, OD, pPLL->OD)
- | FIELD_VALUE(0, PANEL_PLL_CTRL, N, pPLL->N)
- | FIELD_VALUE(0, PANEL_PLL_CTRL, M, pPLL->M);
+ | FIELD_VALUE(0, PANEL_PLL_CTRL, OD, pPLL->OD)
+ | FIELD_VALUE(0, PANEL_PLL_CTRL, N, pPLL->N)
+ | FIELD_VALUE(0, PANEL_PLL_CTRL, M, pPLL->M);
- return(ulPllReg);
+ return(ulPllReg);
}
--
1.7.10.4
^ permalink raw reply related
* [PATCH] staging/sm75fb: Declare static functions as such
From: Ricardo Ribalda Delgado @ 2015-03-16 10:51 UTC (permalink / raw)
To: Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman, linux-fbdev,
devel, linux-kernel
Cc: Ricardo Ribalda Delgado
This patch fixes this sparse warning
CHECK drivers/staging/sm750fb/ddk750_swi2c.c
drivers/staging/sm750fb/ddk750_swi2c.c:223:6: warning: symbol
'swI2CStart' was not declared. Should it be static?
drivers/staging/sm750fb/ddk750_swi2c.c:234:6: warning: symbol
'swI2CStop' was not declared. Should it be static?
drivers/staging/sm750fb/ddk750_swi2c.c:252:6: warning: symbol
'swI2CWriteByte' was not declared. Should it be static?
drivers/staging/sm750fb/ddk750_swi2c.c:320:15: warning: symbol
'swI2CReadByte' was not declared. Should it be static?
drivers/staging/sm750fb/ddk750_swi2c.c:361:6: warning: symbol
'swI2CInit_SM750LE' was not declared. Should it be static?
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
---
drivers/staging/sm750fb/ddk750_swi2c.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/sm750fb/ddk750_swi2c.c b/drivers/staging/sm750fb/ddk750_swi2c.c
index 1249759..231ec85 100644
--- a/drivers/staging/sm750fb/ddk750_swi2c.c
+++ b/drivers/staging/sm750fb/ddk750_swi2c.c
@@ -220,7 +220,7 @@ static void swI2CAck(void)
/*
* This function sends the start command to the slave device
*/
-void swI2CStart(void)
+static void swI2CStart(void)
{
/* Start I2C */
swI2CSDA(1);
@@ -231,7 +231,7 @@ void swI2CStart(void)
/*
* This function sends the stop command to the slave device
*/
-void swI2CStop(void)
+static void swI2CStop(void)
{
/* Stop the I2C */
swI2CSCL(1);
@@ -249,7 +249,7 @@ void swI2CStop(void)
* 0 - Success
* -1 - Fail to write byte
*/
-long swI2CWriteByte(unsigned char data)
+static long swI2CWriteByte(unsigned char data)
{
unsigned char value = data;
int i;
@@ -317,7 +317,7 @@ long swI2CWriteByte(unsigned char data)
* Return Value:
* One byte data read from the Slave device
*/
-unsigned char swI2CReadByte(unsigned char ack)
+static unsigned char swI2CReadByte(unsigned char ack)
{
int i;
unsigned char data = 0;
@@ -358,10 +358,8 @@ unsigned char swI2CReadByte(unsigned char ack)
* -1 - Fail to initialize the i2c
* 0 - Success
*/
-long swI2CInit_SM750LE(
- unsigned char i2cClkGPIO,
- unsigned char i2cDataGPIO
-)
+static long swI2CInit_SM750LE(unsigned char i2cClkGPIO,
+ unsigned char i2cDataGPIO)
{
int i;
--
2.1.4
^ 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