* Re: [PATCH v2] video: fbdev: fix sys_copyarea
From: Måns Rullgård @ 2015-01-30 8:49 UTC (permalink / raw)
To: Tomi Valkeinen
Cc: Jean-Christophe Plagniol-Villard, linux-fbdev, linux-kernel
In-Reply-To: <54CB38B6.3010202@ti.com>
Tomi Valkeinen <tomi.valkeinen@ti.com> writes:
> On 22/01/15 03:19, Mans Rullgard wrote:
>> The sys_copyarea() function performs the same operation as
>> cfb_copyarea() but using normal memory access instead of I/O
>> accessors. Since the introduction of sys_copyarea(), there
>> have been two fixes to cfb_copyarea():
>>
>> - 00a9d699 ("framebuffer: fix cfb_copyarea")
>> - 5b789da8 ("framebuffer: fix screen corruption when copying")
>>
>> This patch incorporates the fixes into sys_copyarea() as well.
>>
>> Signed-off-by: Mans Rullgard <mans@mansr.com>
>> ---
>> Changed in v2:
>> - Fixed wrong first/last calculation in bitcpy_rev()
>> ---
>> drivers/video/fbdev/core/syscopyarea.c | 137 ++++++++++++++++-----------------
>> 1 file changed, 65 insertions(+), 72 deletions(-)
>
> Thanks, queued for 3.20.
>
> This makes me wonder, though, if the sys and cfb versions could be
> somehow combined...
I would have done it by #including a common template with different
macro definitions for the memory access operations.
--
Måns Rullgård
mans@mansr.com
^ permalink raw reply
* [PATCH v6 0/2] fbcon: user-defined cursor blink interval
From: Scot Doyle @ 2015-01-30 9:35 UTC (permalink / raw)
To: Tomi Valkeinen, Jean-Christophe Plagniol-Villard
Cc: Geert Uytterhoeven, Richard Weinberger, linux-fbdev, linux-kernel
In-Reply-To: <alpine.DEB.2.11.1501300843200.2423@localhost.localdomain>
Since users prefer different fbcon cursor blink intervals, allow the
interval to be set via sysfs. The current interval of 200 milliseconds
is retained as the default. Tested with intelfb.
v2: Use kstrtos16() instead of kstrtoul() and min_t() as suggested by
Geert Uytterhoeven
v3: Add error messages as suggested by Tomi Valkeinen
v4: Add rationale into the patches as suggested by Richard Weinberger
v5: Return error codes instead of logging error messages (my mistake)
v6: Uncomment the correct line (my mistake again!)
Scot Doyle (2):
fbcon: store cursor blink interval in fbcon_ops
fbcon: expose cursor blink interval via sysfs
drivers/video/console/fbcon.c | 70 +++++++++++++++++++++++++++++++++++++++++--
drivers/video/console/fbcon.h | 1 +
2 files changed, 69 insertions(+), 2 deletions(-)
--
2.1.4
^ permalink raw reply
* [PATCH v6 1/2] fbcon: store cursor blink interval in fbcon_ops
From: Scot Doyle @ 2015-01-30 9:37 UTC (permalink / raw)
To: Tomi Valkeinen, Jean-Christophe Plagniol-Villard
Cc: Geert Uytterhoeven, Richard Weinberger, linux-fbdev, linux-kernel
In-Reply-To: <alpine.DEB.2.11.1501300932470.2288@localhost.localdomain>
fbcon toggles cursor display state every 200 milliseconds when blinking.
Since users prefer different toggle intervals, prepare to expose the
interval via sysfs by moving it to fbdev_ops and setting the default
to 200 milliseconds.
Signed-off-by: Scot Doyle <lkml14@scotdoyle.com>
---
drivers/video/console/fbcon.c | 5 +++--
drivers/video/console/fbcon.h | 1 +
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index ea43724..7a2030b 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -405,7 +405,7 @@ static void cursor_timer_handler(unsigned long dev_addr)
struct fbcon_ops *ops = info->fbcon_par;
queue_work(system_power_efficient_wq, &info->queue);
- mod_timer(&ops->cursor_timer, jiffies + HZ/5);
+ mod_timer(&ops->cursor_timer, jiffies + ops->blink_jiffies);
}
static void fbcon_add_cursor_timer(struct fb_info *info)
@@ -420,7 +420,7 @@ static void fbcon_add_cursor_timer(struct fb_info *info)
init_timer(&ops->cursor_timer);
ops->cursor_timer.function = cursor_timer_handler;
- ops->cursor_timer.expires = jiffies + HZ / 5;
+ ops->cursor_timer.expires = jiffies + ops->blink_jiffies;
ops->cursor_timer.data = (unsigned long ) info;
add_timer(&ops->cursor_timer);
ops->flags |= FBCON_FLAGS_CURSOR_TIMER;
@@ -959,6 +959,7 @@ static const char *fbcon_startup(void)
ops->currcon = -1;
ops->graphics = 1;
ops->cur_rotate = -1;
+ ops->blink_jiffies = msecs_to_jiffies(200);
info->fbcon_par = ops;
p->con_rotate = initial_rotation;
set_blitting_type(vc, info);
diff --git a/drivers/video/console/fbcon.h b/drivers/video/console/fbcon.h
index 6bd2e0c..642c4e7 100644
--- a/drivers/video/console/fbcon.h
+++ b/drivers/video/console/fbcon.h
@@ -70,6 +70,7 @@ struct fbcon_ops {
struct fb_cursor cursor_state;
struct display *p;
int currcon; /* Current VC. */
+ int blink_jiffies;
int cursor_flash;
int cursor_reset;
int blank_state;
--
2.1.4
^ permalink raw reply related
* [PATCH v6 2/2] fbcon: expose cursor blink interval via sysfs
From: Scot Doyle @ 2015-01-30 9:40 UTC (permalink / raw)
To: Tomi Valkeinen, Jean-Christophe Plagniol-Villard
Cc: Geert Uytterhoeven, Richard Weinberger, linux-fbdev, linux-kernel
In-Reply-To: <alpine.DEB.2.11.1501300932470.2288@localhost.localdomain>
fbcon toggles cursor display state every 200 milliseconds when blinking.
Since users prefer different toggle intervals, expose the interval via
/sys/class/graphics/fbcon/cursor_blink_ms so that it may be customized.
Values written to the interface set the approximate time interval in
milliseconds between cursor toggles, from 1 to 32767. Since the interval
is stored internally as a number of jiffies, the millisecond value read
from the interface may not exactly match the entered value.
An outstanding blink timer is reset after a new value is entered.
If the cursor blink is disabled, either via the 'cursor_blink' boolean
setting or some other mechanism, the 'cursor_blink_ms' setting may still
be modified. The new value will be used if the blink is reactivated.
Signed-off-by: Scot Doyle <lkml14@scotdoyle.com>
---
drivers/video/console/fbcon.c | 65 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 65 insertions(+)
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 7a2030b..7baa333 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -3495,11 +3495,76 @@ err:
return count;
}
+static ssize_t show_cursor_blink_ms(struct device *device,
+ struct device_attribute *attr, char *buf)
+{
+ struct fbcon_ops *ops;
+ int idx, ms = -1;
+
+ if (fbcon_has_exited)
+ return -ENODEV;
+
+ console_lock();
+ idx = con2fb_map[fg_console];
+
+ if (idx != -1 && registered_fb[idx] != NULL) {
+ ops = ((struct fb_info *)registered_fb[idx])->fbcon_par;
+ if (ops != NULL)
+ ms = jiffies_to_msecs(ops->blink_jiffies);
+ }
+
+ console_unlock();
+ return ms < 0 ? -ENODEV : scnprintf(buf, PAGE_SIZE, "%d\n", ms);
+}
+
+static ssize_t store_cursor_blink_ms(struct device *device,
+ struct device_attribute *attr,
+ const char *buf, size_t count)
+{
+ struct fb_info *info;
+ struct fbcon_ops *ops;
+ int idx;
+ short ms;
+ int r = -ENODEV;
+
+ if (fbcon_has_exited)
+ return r;
+
+ console_lock();
+ idx = con2fb_map[fg_console];
+
+ if (idx = -1 || registered_fb[idx] = NULL)
+ goto err;
+
+ info = registered_fb[idx];
+ ops = info->fbcon_par;
+
+ if (ops = NULL)
+ goto err;
+
+ if (!kstrtos16(buf, 0, &ms) && ms > 0) {
+ ops->blink_jiffies = max_t(int, msecs_to_jiffies(ms), 1);
+ if (info->queue.func = fb_flashcursor &&
+ ops->flags & FBCON_FLAGS_CURSOR_TIMER) {
+ fbcon_del_cursor_timer(info);
+ fbcon_add_cursor_timer(info);
+ }
+ r = count;
+ } else
+ r = -EINVAL;
+
+err:
+ console_unlock();
+ return r;
+}
+
static struct device_attribute device_attrs[] = {
__ATTR(rotate, S_IRUGO|S_IWUSR, show_rotate, store_rotate),
__ATTR(rotate_all, S_IWUSR, NULL, store_rotate_all),
__ATTR(cursor_blink, S_IRUGO|S_IWUSR, show_cursor_blink,
store_cursor_blink),
+ __ATTR(cursor_blink_ms, S_IRUGO|S_IWUSR, show_cursor_blink_ms,
+ store_cursor_blink_ms),
};
static int fbcon_init_device(void)
--
2.1.4
^ permalink raw reply related
* [PATCH 03/15] fbdev: aty128fb: replace PPC_OF with PPC
From: Kevin Hao @ 2015-01-31 13:47 UTC (permalink / raw)
To: linuxppc-dev, linux-fbdev
Cc: Kevin Hao, Tomi Valkeinen, Jean-Christophe Plagniol-Villard,
Paul Mackerras
In-Reply-To: <1422712065-9403-1-git-send-email-haokexin@gmail.com>
The PPC_OF is a ppc specific option which is used to mean that the
firmware device tree access functions are available. Since all the
ppc platforms have a device tree, it is aways set to 'y' for ppc.
So it makes no sense to keep a such option in the current kernel.
Replace it with PPC.
Signed-off-by: Kevin Hao <haokexin@gmail.com>
---
drivers/video/fbdev/aty/aty128fb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/fbdev/aty/aty128fb.c b/drivers/video/fbdev/aty/aty128fb.c
index aedf2fbf9bf6..0156954bf340 100644
--- a/drivers/video/fbdev/aty/aty128fb.c
+++ b/drivers/video/fbdev/aty/aty128fb.c
@@ -965,7 +965,7 @@ static void __iomem *aty128_find_mem_vbios(struct aty128fb_par *par)
/* fill in known card constants if pll_block is not available */
static void aty128_timings(struct aty128fb_par *par)
{
-#ifdef CONFIG_PPC_OF
+#ifdef CONFIG_PPC
/* instead of a table lookup, assume OF has properly
* setup the PLL registers and use their values
* to set the XCLK values and reference divider values */
@@ -979,7 +979,7 @@ static void aty128_timings(struct aty128fb_par *par)
if (!par->constants.ref_clk)
par->constants.ref_clk = 2950;
-#ifdef CONFIG_PPC_OF
+#ifdef CONFIG_PPC
x_mpll_ref_fb_div = aty_ld_pll(X_MPLL_REF_FB_DIV);
xclk_cntl = aty_ld_pll(XCLK_CNTL) & 0x7;
Nx = (x_mpll_ref_fb_div & 0x00ff00) >> 8;
--
1.9.3
^ permalink raw reply related
* [PATCH 04/15] fbdev: radeon: replace PPC_OF with PPC
From: Kevin Hao @ 2015-01-31 13:47 UTC (permalink / raw)
To: linuxppc-dev, linux-fbdev
Cc: Kevin Hao, Tomi Valkeinen, Jean-Christophe Plagniol-Villard
In-Reply-To: <1422712065-9403-1-git-send-email-haokexin@gmail.com>
The PPC_OF is a ppc specific option which is used to mean that the
firmware device tree access functions are available. Since all the
ppc platforms have a device tree, it is aways set to 'y' for ppc.
So it makes no sense to keep a such option in the current kernel.
Replace it with PPC.
Signed-off-by: Kevin Hao <haokexin@gmail.com>
---
drivers/video/fbdev/Kconfig | 2 +-
drivers/video/fbdev/aty/radeon_base.c | 24 ++++++++++++------------
drivers/video/fbdev/aty/radeon_monitor.c | 20 ++++++++++----------
drivers/video/fbdev/aty/radeon_pm.c | 16 ++++++++--------
drivers/video/fbdev/aty/radeonfb.h | 4 ++--
5 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index f2c3fb7d0399..55161dd4b931 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -1333,7 +1333,7 @@ config FB_RADEON
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
- select FB_MACMODES if PPC_OF
+ select FB_MACMODES if PPC
help
Choose this option if you want to use an ATI Radeon graphics card as
a framebuffer device. There are both PCI and AGP versions. You
diff --git a/drivers/video/fbdev/aty/radeon_base.c b/drivers/video/fbdev/aty/radeon_base.c
index 26d80a4486fb..01237c8fcdc6 100644
--- a/drivers/video/fbdev/aty/radeon_base.c
+++ b/drivers/video/fbdev/aty/radeon_base.c
@@ -74,7 +74,7 @@
#include <asm/io.h>
#include <linux/uaccess.h>
-#ifdef CONFIG_PPC_OF
+#ifdef CONFIG_PPC
#include <asm/pci-bridge.h>
#include "../macmodes.h"
@@ -83,7 +83,7 @@
#include <asm/btext.h>
#endif
-#endif /* CONFIG_PPC_OF */
+#endif /* CONFIG_PPC */
#ifdef CONFIG_MTRR
#include <asm/mtrr.h>
@@ -418,7 +418,7 @@ static int radeon_find_mem_vbios(struct radeonfb_info *rinfo)
}
#endif
-#if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC)
+#if defined(CONFIG_PPC) || defined(CONFIG_SPARC)
/*
* Read XTAL (ref clock), SCLK and MCLK from Open Firmware device
* tree. Hopefully, ATI OF driver is kind enough to fill these
@@ -448,7 +448,7 @@ static int radeon_read_xtal_OF(struct radeonfb_info *rinfo)
return 0;
}
-#endif /* CONFIG_PPC_OF || CONFIG_SPARC */
+#endif /* CONFIG_PPC || CONFIG_SPARC */
/*
* Read PLL infos from chip registers
@@ -653,7 +653,7 @@ static void radeon_get_pllinfo(struct radeonfb_info *rinfo)
rinfo->pll.ref_div = INPLL(PPLL_REF_DIV) & PPLL_REF_DIV_MASK;
-#if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC)
+#if defined(CONFIG_PPC) || defined(CONFIG_SPARC)
/*
* Retrieve PLL infos from Open Firmware first
*/
@@ -661,7 +661,7 @@ static void radeon_get_pllinfo(struct radeonfb_info *rinfo)
printk(KERN_INFO "radeonfb: Retrieved PLL infos from Open Firmware\n");
goto found;
}
-#endif /* CONFIG_PPC_OF || CONFIG_SPARC */
+#endif /* CONFIG_PPC || CONFIG_SPARC */
/*
* Check out if we have an X86 which gave us some PLL informations
@@ -1910,7 +1910,7 @@ static int radeon_set_fbinfo(struct radeonfb_info *rinfo)
* I put the card's memory at 0 in card space and AGP at some random high
* local (0xe0000000 for now) that will be changed by XFree/DRI anyway
*/
-#ifdef CONFIG_PPC_OF
+#ifdef CONFIG_PPC
#undef SET_MC_FB_FROM_APERTURE
static void fixup_memory_mappings(struct radeonfb_info *rinfo)
{
@@ -1984,7 +1984,7 @@ static void fixup_memory_mappings(struct radeonfb_info *rinfo)
((aper_base + aper_size - 1) & 0xffff0000) | (aper_base >> 16),
0xffff0000 | (agp_base >> 16));
}
-#endif /* CONFIG_PPC_OF */
+#endif /* CONFIG_PPC */
static void radeon_identify_vram(struct radeonfb_info *rinfo)
@@ -2236,7 +2236,7 @@ static int radeonfb_pci_register(struct pci_dev *pdev,
rinfo->family = CHIP_FAMILY_RS200)
rinfo->errata |= CHIP_ERRATA_PLL_DELAY;
-#if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC)
+#if defined(CONFIG_PPC) || defined(CONFIG_SPARC)
/* On PPC, we obtain the OF device-node pointer to the firmware
* data for this chip
*/
@@ -2245,14 +2245,14 @@ static int radeonfb_pci_register(struct pci_dev *pdev,
printk(KERN_WARNING "radeonfb (%s): Cannot match card to OF node !\n",
pci_name(rinfo->pdev));
-#endif /* CONFIG_PPC_OF || CONFIG_SPARC */
-#ifdef CONFIG_PPC_OF
+#endif /* CONFIG_PPC || CONFIG_SPARC */
+#ifdef CONFIG_PPC
/* On PPC, the firmware sets up a memory mapping that tends
* to cause lockups when enabling the engine. We reconfigure
* the card internal memory mappings properly
*/
fixup_memory_mappings(rinfo);
-#endif /* CONFIG_PPC_OF */
+#endif /* CONFIG_PPC */
/* Get VRAM size and type */
radeon_identify_vram(rinfo);
diff --git a/drivers/video/fbdev/aty/radeon_monitor.c b/drivers/video/fbdev/aty/radeon_monitor.c
index bc078d50d8f1..f1ce229de78d 100644
--- a/drivers/video/fbdev/aty/radeon_monitor.c
+++ b/drivers/video/fbdev/aty/radeon_monitor.c
@@ -55,7 +55,7 @@ static char *radeon_get_mon_name(int type)
}
-#if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC)
+#if defined(CONFIG_PPC) || defined(CONFIG_SPARC)
/*
* Try to find monitor informations & EDID data out of the Open Firmware
* device-tree. This also contains some "hacks" to work around a few machine
@@ -160,7 +160,7 @@ static int radeon_probe_OF_head(struct radeonfb_info *rinfo, int head_no,
}
return MT_NONE;
}
-#endif /* CONFIG_PPC_OF || CONFIG_SPARC */
+#endif /* CONFIG_PPC || CONFIG_SPARC */
static int radeon_get_panel_info_BIOS(struct radeonfb_info *rinfo)
@@ -499,11 +499,11 @@ void radeon_probe_screens(struct radeonfb_info *rinfo,
* Old single head cards
*/
if (!rinfo->has_CRTC2) {
-#if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC)
+#if defined(CONFIG_PPC) || defined(CONFIG_SPARC)
if (rinfo->mon1_type = MT_NONE)
rinfo->mon1_type = radeon_probe_OF_head(rinfo, 0,
&rinfo->mon1_EDID);
-#endif /* CONFIG_PPC_OF || CONFIG_SPARC */
+#endif /* CONFIG_PPC || CONFIG_SPARC */
#ifdef CONFIG_FB_RADEON_I2C
if (rinfo->mon1_type = MT_NONE)
rinfo->mon1_type @@ -548,11 +548,11 @@ void radeon_probe_screens(struct radeonfb_info *rinfo,
/*
* Probe primary head (DVI or laptop internal panel)
*/
-#if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC)
+#if defined(CONFIG_PPC) || defined(CONFIG_SPARC)
if (rinfo->mon1_type = MT_NONE)
rinfo->mon1_type = radeon_probe_OF_head(rinfo, 0,
&rinfo->mon1_EDID);
-#endif /* CONFIG_PPC_OF || CONFIG_SPARC */
+#endif /* CONFIG_PPC || CONFIG_SPARC */
#ifdef CONFIG_FB_RADEON_I2C
if (rinfo->mon1_type = MT_NONE)
rinfo->mon1_type = radeon_probe_i2c_connector(rinfo, ddc_dvi,
@@ -576,11 +576,11 @@ void radeon_probe_screens(struct radeonfb_info *rinfo,
/*
* Probe secondary head (mostly VGA, can be DVI)
*/
-#if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC)
+#if defined(CONFIG_PPC) || defined(CONFIG_SPARC)
if (rinfo->mon2_type = MT_NONE)
rinfo->mon2_type = radeon_probe_OF_head(rinfo, 1,
&rinfo->mon2_EDID);
-#endif /* CONFIG_PPC_OF || defined(CONFIG_SPARC) */
+#endif /* CONFIG_PPC || defined(CONFIG_SPARC) */
#ifdef CONFIG_FB_RADEON_I2C
if (rinfo->mon2_type = MT_NONE)
rinfo->mon2_type = radeon_probe_i2c_connector(rinfo, ddc_vga,
@@ -653,7 +653,7 @@ void radeon_probe_screens(struct radeonfb_info *rinfo,
*/
static void radeon_fixup_panel_info(struct radeonfb_info *rinfo)
{
-#ifdef CONFIG_PPC_OF
+#ifdef CONFIG_PPC
/*
* LCD Flat panels should use fixed dividers, we enfore that on
* PPC only for now...
@@ -676,7 +676,7 @@ static void radeon_fixup_panel_info(struct radeonfb_info *rinfo)
(rinfo->panel_info.post_divider << 16),
ppll_div_sel);
}
-#endif /* CONFIG_PPC_OF */
+#endif /* CONFIG_PPC */
}
diff --git a/drivers/video/fbdev/aty/radeon_pm.c b/drivers/video/fbdev/aty/radeon_pm.c
index 46a12f1a93c3..1417542738fc 100644
--- a/drivers/video/fbdev/aty/radeon_pm.c
+++ b/drivers/video/fbdev/aty/radeon_pm.c
@@ -523,7 +523,7 @@ static void radeon_pm_enable_dynamic_mode(struct radeonfb_info *rinfo)
OUTPLL(pllVCLK_ECP_CNTL, tmp);
/* X doesn't do that ... hrm, we do on mobility && Macs */
-#ifdef CONFIG_PPC_OF
+#ifdef CONFIG_PPC
if (rinfo->is_mobility) {
tmp = INPLL(pllMCLK_CNTL);
tmp &= ~(MCLK_CNTL__FORCE_MCLKA |
@@ -541,7 +541,7 @@ static void radeon_pm_enable_dynamic_mode(struct radeonfb_info *rinfo)
OUTPLL(pllMCLK_MISC, tmp);
radeon_msleep(15);
}
-#endif /* CONFIG_PPC_OF */
+#endif /* CONFIG_PPC */
}
#ifdef CONFIG_PM
@@ -1288,7 +1288,7 @@ static void radeon_pm_full_reset_sdram(struct radeonfb_info *rinfo)
radeon_pm_enable_dll_m10(rinfo);
radeon_pm_yclk_mclk_sync_m10(rinfo);
-#ifdef CONFIG_PPC_OF
+#ifdef CONFIG_PPC
if (rinfo->of_node != NULL) {
int size;
@@ -1298,7 +1298,7 @@ static void radeon_pm_full_reset_sdram(struct radeonfb_info *rinfo)
else
mrtable = default_mrtable;
}
-#endif /* CONFIG_PPC_OF */
+#endif /* CONFIG_PPC */
/* Program the SDRAM */
sdram_mode_reg = mrtable[0];
@@ -1943,7 +1943,7 @@ static void radeon_reinitialize_M10(struct radeonfb_info *rinfo)
}
#endif
-#ifdef CONFIG_PPC_OF
+#ifdef CONFIG_PPC
#ifdef CONFIG_PPC_PMAC
static void radeon_pm_m9p_reconfigure_mc(struct radeonfb_info *rinfo)
{
@@ -2512,7 +2512,7 @@ static void radeon_reinitialize_QW(struct radeonfb_info *rinfo)
}
#endif /* 0 */
-#endif /* CONFIG_PPC_OF */
+#endif /* CONFIG_PPC */
static void radeonfb_whack_power_state(struct radeonfb_info *rinfo, pci_power_t state)
{
@@ -2793,7 +2793,7 @@ int radeonfb_pci_resume(struct pci_dev *pdev)
return rc;
}
-#ifdef CONFIG_PPC_OF__disabled
+#ifdef CONFIG_PPC__disabled
static void radeonfb_early_resume(void *data)
{
struct radeonfb_info *rinfo = data;
@@ -2803,7 +2803,7 @@ static void radeonfb_early_resume(void *data)
radeonfb_pci_resume(rinfo->pdev);
rinfo->no_schedule = 0;
}
-#endif /* CONFIG_PPC_OF */
+#endif /* CONFIG_PPC */
#endif /* CONFIG_PM */
diff --git a/drivers/video/fbdev/aty/radeonfb.h b/drivers/video/fbdev/aty/radeonfb.h
index cb846044f57c..039def41c920 100644
--- a/drivers/video/fbdev/aty/radeonfb.h
+++ b/drivers/video/fbdev/aty/radeonfb.h
@@ -20,7 +20,7 @@
#include <asm/io.h>
-#if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC)
+#if defined(CONFIG_PPC) || defined(CONFIG_SPARC)
#include <asm/prom.h>
#endif
@@ -301,7 +301,7 @@ struct radeonfb_info {
unsigned long fb_local_base;
struct pci_dev *pdev;
-#if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC)
+#if defined(CONFIG_PPC) || defined(CONFIG_SPARC)
struct device_node *of_node;
#endif
--
1.9.3
^ permalink raw reply related
* [PATCH 05/15] fbdev: imsttfb: remove the dependency on PPC_OF
From: Kevin Hao @ 2015-01-31 13:47 UTC (permalink / raw)
To: linuxppc-dev, linux-fbdev
Cc: Kevin Hao, Tomi Valkeinen, Jean-Christophe Plagniol-Villard
In-Reply-To: <1422712065-9403-1-git-send-email-haokexin@gmail.com>
The OF functionality has moved to a common place and be used by many
archs. So we don't need to depend on PPC_OF option any more. This is
a preparation for killing PPC_OF.
Signed-off-by: Kevin Hao <haokexin@gmail.com>
---
drivers/video/fbdev/imsttfb.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/video/fbdev/imsttfb.c b/drivers/video/fbdev/imsttfb.c
index aae10ce74f14..91a80bb8f988 100644
--- a/drivers/video/fbdev/imsttfb.c
+++ b/drivers/video/fbdev/imsttfb.c
@@ -1470,7 +1470,6 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
unsigned long addr, size;
struct imstt_par *par;
struct fb_info *info;
-#ifdef CONFIG_PPC_OF
struct device_node *dp;
dp = pci_device_to_OF_node(pdev);
@@ -1478,7 +1477,6 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
printk(KERN_INFO "%s: OF name %s\n",__func__, dp->name);
else
printk(KERN_ERR "imsttfb: no OF node for pci device\n");
-#endif /* CONFIG_PPC_OF */
info = framebuffer_alloc(sizeof(struct imstt_par), &pdev->dev);
@@ -1501,11 +1499,9 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
switch (pdev->device) {
case PCI_DEVICE_ID_IMS_TT128: /* IMS,tt128mbA */
par->ramdac = IBM;
-#ifdef CONFIG_PPC_OF
if (dp && ((strcmp(dp->name, "IMS,tt128mb8") = 0) ||
(strcmp(dp->name, "IMS,tt128mb8A") = 0)))
par->ramdac = TVP;
-#endif /* CONFIG_PPC_OF */
break;
case PCI_DEVICE_ID_IMS_TT3D: /* IMS,tt3d */
par->ramdac = TVP;
--
1.9.3
^ permalink raw reply related
* [PATCH 06/15] fbdev: nvidia: remove the dependency on PPC_OF
From: Kevin Hao @ 2015-01-31 13:47 UTC (permalink / raw)
To: linuxppc-dev, linux-fbdev
Cc: Kevin Hao, Tomi Valkeinen, Jean-Christophe Plagniol-Villard,
Antonino Daplas
In-Reply-To: <1422712065-9403-1-git-send-email-haokexin@gmail.com>
The OF functionality has moved to a common place and be used by many
archs. So we don't need to include the ppc arch specific header files
and depend on PPC_OF option any more. This is a preparation for
killing PPC_OF.
Signed-off-by: Kevin Hao <haokexin@gmail.com>
---
drivers/video/fbdev/nvidia/Makefile | 3 +--
drivers/video/fbdev/nvidia/nv_of.c | 3 ---
drivers/video/fbdev/nvidia/nv_proto.h | 8 --------
drivers/video/fbdev/nvidia/nvidia.c | 4 ----
4 files changed, 1 insertion(+), 17 deletions(-)
diff --git a/drivers/video/fbdev/nvidia/Makefile b/drivers/video/fbdev/nvidia/Makefile
index ca47432113e0..917d3eb05feb 100644
--- a/drivers/video/fbdev/nvidia/Makefile
+++ b/drivers/video/fbdev/nvidia/Makefile
@@ -5,9 +5,8 @@
obj-$(CONFIG_FB_NVIDIA) += nvidiafb.o
nvidiafb-y := nvidia.o nv_hw.o nv_setup.o \
- nv_accel.o
+ nv_accel.o nv_of.o
nvidiafb-$(CONFIG_FB_NVIDIA_I2C) += nv_i2c.o
nvidiafb-$(CONFIG_FB_NVIDIA_BACKLIGHT) += nv_backlight.o
-nvidiafb-$(CONFIG_PPC_OF) += nv_of.o
nvidiafb-objs := $(nvidiafb-y)
diff --git a/drivers/video/fbdev/nvidia/nv_of.c b/drivers/video/fbdev/nvidia/nv_of.c
index 3bc13df4b120..5f3e5179c25a 100644
--- a/drivers/video/fbdev/nvidia/nv_of.c
+++ b/drivers/video/fbdev/nvidia/nv_of.c
@@ -19,9 +19,6 @@
#include <asm/io.h>
-#include <asm/prom.h>
-#include <asm/pci-bridge.h>
-
#include "nv_type.h"
#include "nv_local.h"
#include "nv_proto.h"
diff --git a/drivers/video/fbdev/nvidia/nv_proto.h b/drivers/video/fbdev/nvidia/nv_proto.h
index ff5c410355ea..878a5ce02299 100644
--- a/drivers/video/fbdev/nvidia/nv_proto.h
+++ b/drivers/video/fbdev/nvidia/nv_proto.h
@@ -42,16 +42,8 @@ int nvidia_probe_i2c_connector(struct fb_info *info, int conn,
#define nvidia_probe_i2c_connector(p, c, edid) (-1)
#endif
-#ifdef CONFIG_PPC_OF
int nvidia_probe_of_connector(struct fb_info *info, int conn,
u8 ** out_edid);
-#else
-static inline int nvidia_probe_of_connector(struct fb_info *info, int conn,
- u8 ** out_edid)
-{
- return -1;
-}
-#endif
/* in nv_accel.c */
extern void NVResetGraphics(struct fb_info *info);
diff --git a/drivers/video/fbdev/nvidia/nvidia.c b/drivers/video/fbdev/nvidia/nvidia.c
index def041204676..4273c6ee8cf6 100644
--- a/drivers/video/fbdev/nvidia/nvidia.c
+++ b/drivers/video/fbdev/nvidia/nvidia.c
@@ -24,10 +24,6 @@
#ifdef CONFIG_MTRR
#include <asm/mtrr.h>
#endif
-#ifdef CONFIG_PPC_OF
-#include <asm/prom.h>
-#include <asm/pci-bridge.h>
-#endif
#ifdef CONFIG_BOOTX_TEXT
#include <asm/btext.h>
#endif
--
1.9.3
^ permalink raw reply related
* [PATCH 07/15] fbdev: riva: remove the dependency on PPC_OF
From: Kevin Hao @ 2015-01-31 13:47 UTC (permalink / raw)
To: linuxppc-dev, linux-fbdev
Cc: Kevin Hao, Tomi Valkeinen, Jean-Christophe Plagniol-Villard,
Antonino Daplas
In-Reply-To: <1422712065-9403-1-git-send-email-haokexin@gmail.com>
The OF functionality has moved to a common place and be used by many
archs. So we don't need to include the ppc arch specific header files
and depend on PPC_OF option any more. This is a preparation for
killing PPC_OF.
Signed-off-by: Kevin Hao <haokexin@gmail.com>
---
drivers/video/fbdev/riva/fbdev.c | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/drivers/video/fbdev/riva/fbdev.c b/drivers/video/fbdev/riva/fbdev.c
index be73727c7227..294a80908c8c 100644
--- a/drivers/video/fbdev/riva/fbdev.c
+++ b/drivers/video/fbdev/riva/fbdev.c
@@ -44,10 +44,6 @@
#ifdef CONFIG_MTRR
#include <asm/mtrr.h>
#endif
-#ifdef CONFIG_PPC_OF
-#include <asm/prom.h>
-#include <asm/pci-bridge.h>
-#endif
#ifdef CONFIG_PMAC_BACKLIGHT
#include <asm/machdep.h>
#include <asm/backlight.h>
@@ -1735,7 +1731,6 @@ static int riva_set_fbinfo(struct fb_info *info)
return (rivafb_check_var(&info->var, info));
}
-#ifdef CONFIG_PPC_OF
static int riva_get_EDID_OF(struct fb_info *info, struct pci_dev *pd)
{
struct riva_par *par = info->par;
@@ -1766,9 +1761,8 @@ static int riva_get_EDID_OF(struct fb_info *info, struct pci_dev *pd)
NVTRACE_LEAVE();
return 0;
}
-#endif /* CONFIG_PPC_OF */
-#if defined(CONFIG_FB_RIVA_I2C) && !defined(CONFIG_PPC_OF)
+#if defined(CONFIG_FB_RIVA_I2C)
static int riva_get_EDID_i2c(struct fb_info *info)
{
struct riva_par *par = info->par;
@@ -1828,10 +1822,13 @@ static void riva_update_default_var(struct fb_var_screeninfo *var,
static void riva_get_EDID(struct fb_info *info, struct pci_dev *pdev)
{
NVTRACE_ENTER();
-#ifdef CONFIG_PPC_OF
- if (!riva_get_EDID_OF(info, pdev))
+ if (riva_get_EDID_OF(info, pdev)) {
+ NVTRACE_LEAVE();
+ return;
+ }
+ if (IS_ENABLED(CONFIG_OF))
printk(PFX "could not retrieve EDID from OF\n");
-#elif defined(CONFIG_FB_RIVA_I2C)
+#if defined(CONFIG_FB_RIVA_I2C)
if (!riva_get_EDID_i2c(info))
printk(PFX "could not retrieve EDID from DDC/I2C\n");
#endif
--
1.9.3
^ permalink raw reply related
* [PATCH 08/15] fbdev: remove the unnecessary includes of ppc specific header files
From: Kevin Hao @ 2015-01-31 13:47 UTC (permalink / raw)
To: linuxppc-dev, linux-fbdev
Cc: Kevin Hao, Tomi Valkeinen, Jean-Christophe Plagniol-Villard
In-Reply-To: <1422712065-9403-1-git-send-email-haokexin@gmail.com>
In the current kernel, we don't need to include these arch specific
header files for ppc.
Signed-off-by: Kevin Hao <haokexin@gmail.com>
---
drivers/video/fbdev/core/fbmon.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/video/fbdev/core/fbmon.c b/drivers/video/fbdev/core/fbmon.c
index 95338593ebf4..3ae868c58cef 100644
--- a/drivers/video/fbdev/core/fbmon.c
+++ b/drivers/video/fbdev/core/fbmon.c
@@ -33,10 +33,6 @@
#include <video/edid.h>
#include <video/of_videomode.h>
#include <video/videomode.h>
-#ifdef CONFIG_PPC_OF
-#include <asm/prom.h>
-#include <asm/pci-bridge.h>
-#endif
#include "../edid.h"
/*
--
1.9.3
^ permalink raw reply related
* [PATCH 09/15] fbdev: kconfig: replace PPC_OF with PPC
From: Kevin Hao @ 2015-01-31 13:47 UTC (permalink / raw)
To: linuxppc-dev, linux-fbdev
Cc: Kevin Hao, Tomi Valkeinen, Jean-Christophe Plagniol-Villard
In-Reply-To: <1422712065-9403-1-git-send-email-haokexin@gmail.com>
The PPC_OF is a ppc specific option which is used to mean that the
firmware device tree access functions are available. Since all the
ppc platforms have a device tree, it is aways set to 'y' for ppc.
So it makes no sense to keep a such option in the current kernel.
Replace it with PPC.
Signed-off-by: Kevin Hao <haokexin@gmail.com>
---
drivers/video/fbdev/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index 55161dd4b931..027f9b685b5b 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -479,7 +479,7 @@ config FB_ATARI
config FB_OF
bool "Open Firmware frame buffer device support"
- depends on (FB = y) && (PPC64 || PPC_OF) && (!PPC_PSERIES || PCI)
+ depends on (FB = y) && PPC && (!PPC_PSERIES || PCI)
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
--
1.9.3
^ permalink raw reply related
* Re: [PATCH 05/15] fbdev: imsttfb: remove the dependency on PPC_OF
From: Stephen Rothwell @ 2015-02-01 2:44 UTC (permalink / raw)
To: Kevin Hao
Cc: Jean-Christophe Plagniol-Villard, linux-fbdev, Tomi Valkeinen,
linuxppc-dev
In-Reply-To: <1422712065-9403-6-git-send-email-haokexin@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1520 bytes --]
Hi Kevin,
On Sat, 31 Jan 2015 21:47:35 +0800 Kevin Hao <haokexin@gmail.com> wrote:
>
> The OF functionality has moved to a common place and be used by many
> archs. So we don't need to depend on PPC_OF option any more. This is
> a preparation for killing PPC_OF.
I suspect that you want to do the PPC_OF -> PPC conversion on this file
rather than just removing PPC_OF uses.
> diff --git a/drivers/video/fbdev/imsttfb.c b/drivers/video/fbdev/imsttfb.c
> index aae10ce74f14..91a80bb8f988 100644
> --- a/drivers/video/fbdev/imsttfb.c
> +++ b/drivers/video/fbdev/imsttfb.c
> @@ -1470,7 +1470,6 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> unsigned long addr, size;
> struct imstt_par *par;
> struct fb_info *info;
> -#ifdef CONFIG_PPC_OF
> struct device_node *dp;
I see no way in this file for struct device_node to be defined
(especially if CONFIG_PPC is not set). of.h may be included
implicitly, but that is very dependent on the architecture and CONFIG_
options.
> dp = pci_device_to_OF_node(pdev);
> @@ -1478,7 +1477,6 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> printk(KERN_INFO "%s: OF name %s\n",__func__, dp->name);
> else
> printk(KERN_ERR "imsttfb: no OF node for pci device\n");
> -#endif /* CONFIG_PPC_OF */
This will emit the above error if CONFIG_OF is not set whereas in the
past it would not.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply
* Re: [PATCH 05/15] fbdev: imsttfb: remove the dependency on PPC_OF
From: Kevin Hao @ 2015-02-01 5:51 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Jean-Christophe Plagniol-Villard, linux-fbdev, Tomi Valkeinen,
linuxppc-dev
In-Reply-To: <20150201134433.729a2389@canb.auug.org.au>
[-- Attachment #1: Type: text/plain, Size: 2077 bytes --]
On Sun, Feb 01, 2015 at 01:44:33PM +1100, Stephen Rothwell wrote:
> Hi Kevin,
>
> On Sat, 31 Jan 2015 21:47:35 +0800 Kevin Hao <haokexin@gmail.com> wrote:
> >
> > The OF functionality has moved to a common place and be used by many
> > archs. So we don't need to depend on PPC_OF option any more. This is
> > a preparation for killing PPC_OF.
>
> I suspect that you want to do the PPC_OF -> PPC conversion on this file
> rather than just removing PPC_OF uses.
That was my first thought, but the codes protected by the PPC_OF seem not
ppc specific and should be safe for other archs which also support OF. So I
drop the PPC_OF completely. Did I miss something?
>
> > diff --git a/drivers/video/fbdev/imsttfb.c b/drivers/video/fbdev/imsttfb.c
> > index aae10ce74f14..91a80bb8f988 100644
> > --- a/drivers/video/fbdev/imsttfb.c
> > +++ b/drivers/video/fbdev/imsttfb.c
> > @@ -1470,7 +1470,6 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> > unsigned long addr, size;
> > struct imstt_par *par;
> > struct fb_info *info;
> > -#ifdef CONFIG_PPC_OF
> > struct device_node *dp;
>
> I see no way in this file for struct device_node to be defined
> (especially if CONFIG_PPC is not set). of.h may be included
> implicitly, but that is very dependent on the architecture and CONFIG_
> options.
This do pass the build test for the non-OF archs, such as x86. But your
concerns sound pretty reasonable, so I will explicitly include of.h.
>
> > dp = pci_device_to_OF_node(pdev);
> > @@ -1478,7 +1477,6 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> > printk(KERN_INFO "%s: OF name %s\n",__func__, dp->name);
> > else
> > printk(KERN_ERR "imsttfb: no OF node for pci device\n");
> > -#endif /* CONFIG_PPC_OF */
>
> This will emit the above error if CONFIG_OF is not set whereas in the
> past it would not.
How about change it to:
if (IS_ENABLED(CONFIG_OF))
printk(KERN_ERR "imsttfb: no OF node for pci device\n");
Thanks,
Kevin
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply
* Re: possible fb bug in linux-next 20150202
From: Hans de Goede @ 2015-02-02 13:42 UTC (permalink / raw)
To: linux-fbdev
Hi,
On 02-02-15 14:36, Rares Aioanei wrote:
> Hi,
>
> First, sorry for the unproperly-formatted mail but I'm at work and this is
> the only way. Second, I installed the latest linux-next on a Dell Latitude
> D520 at work and the kernel won't boot unless I add nofb at the command
> line. Is this a known issue or do you need me to send all the good stuff
> (dmesg, cpuinfo and so on)? If there's anything I can do to help, please
> let me know. I have some time to test.
Not sure why you are sending this to me ?
Are you using a kernel with simplefb support enabled on x86? I only maintain
the simplefb driver, and you're not supposed to use that on x86.
Eitherway please send a detailed bug report to:
"Linux Fbdev development list <linux-fbdev@vger.kernel.org>"
with me in the Cc.
Regards,
Hans
^ permalink raw reply
* Re: FB issue in linux-next-20150202
From: Hans de Goede @ 2015-02-02 18:37 UTC (permalink / raw)
To: linux-fbdev
Hi,
On 02-02-15 15:49, Rares Aioanei wrote:
> Hi,
>
> Can't seem to be able to boot with the kernel in the subject on a Dell
> Latitude D520. I get a stack trace and the system locks down. This is
> OpenSUSE 13.2 64-bit. Attached is all the info I could gather. Please
> let me know if there is anything else.
This seems to be an issue with the intel gfx kernel driver, please file
a bug using the instructions provided here:
https://01.org/linuxgraphics/documentation/how-report-bugs
Regards,
Hans
^ permalink raw reply
* Re: [PATCH 05/15] fbdev: imsttfb: remove the dependency on PPC_OF
From: Kevin Hao @ 2015-02-03 2:20 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Jean-Christophe Plagniol-Villard, linux-fbdev, Tomi Valkeinen,
linuxppc-dev
In-Reply-To: <20150201055150.GA6681@pek-khao-d1.corp.ad.wrs.com>
[-- Attachment #1: Type: text/plain, Size: 1244 bytes --]
On Sun, Feb 01, 2015 at 01:51:50PM +0800, Kevin Hao wrote:
> > > diff --git a/drivers/video/fbdev/imsttfb.c b/drivers/video/fbdev/imsttfb.c
> > > index aae10ce74f14..91a80bb8f988 100644
> > > --- a/drivers/video/fbdev/imsttfb.c
> > > +++ b/drivers/video/fbdev/imsttfb.c
> > > @@ -1470,7 +1470,6 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> > > unsigned long addr, size;
> > > struct imstt_par *par;
> > > struct fb_info *info;
> > > -#ifdef CONFIG_PPC_OF
> > > struct device_node *dp;
> >
> > I see no way in this file for struct device_node to be defined
> > (especially if CONFIG_PPC is not set). of.h may be included
> > implicitly, but that is very dependent on the architecture and CONFIG_
> > options.
>
> This do pass the build test for the non-OF archs, such as x86. But your
> concerns sound pretty reasonable, so I will explicitly include of.h.
I took a second look at this. It seems that there is a declaration of
struct device_node in linux/device.h and there is also no access to the
member of device_node in this driver. So we are safe to not include of.h here.
That is also why I didn't get the build failure for the non-OF archs. :-)
Thanks,
Kevin
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply
* Re: [PATCH 05/15] fbdev: imsttfb: remove the dependency on PPC_OF
From: Stephen Rothwell @ 2015-02-03 2:34 UTC (permalink / raw)
To: Kevin Hao
Cc: Jean-Christophe Plagniol-Villard, linux-fbdev, Tomi Valkeinen,
linuxppc-dev
In-Reply-To: <20150201055150.GA6681@pek-khao-d1.corp.ad.wrs.com>
[-- Attachment #1: Type: text/plain, Size: 966 bytes --]
Hi Kevin,
On Sun, 1 Feb 2015 13:51:50 +0800 Kevin Hao <haokexin@gmail.com> wrote:
>
> That was my first thought, but the codes protected by the PPC_OF seem not
> ppc specific and should be safe for other archs which also support OF. So I
> drop the PPC_OF completely. Did I miss something?
Ah, ok.
> > > dp = pci_device_to_OF_node(pdev);
> > > @@ -1478,7 +1477,6 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> > > printk(KERN_INFO "%s: OF name %s\n",__func__, dp->name);
> > > else
> > > printk(KERN_ERR "imsttfb: no OF node for pci device\n");
> > > -#endif /* CONFIG_PPC_OF */
> >
> > This will emit the above error if CONFIG_OF is not set whereas in the
> > past it would not.
>
> How about change it to:
> if (IS_ENABLED(CONFIG_OF))
> printk(KERN_ERR "imsttfb: no OF node for pci device\n");
Looks good.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply
* Re: [PATCH 05/15] fbdev: imsttfb: remove the dependency on PPC_OF
From: Stephen Rothwell @ 2015-02-03 2:34 UTC (permalink / raw)
To: Kevin Hao
Cc: Jean-Christophe Plagniol-Villard, linux-fbdev, Tomi Valkeinen,
linuxppc-dev
In-Reply-To: <20150203022002.GB28170@pek-khao-d1.corp.ad.wrs.com>
[-- Attachment #1: Type: text/plain, Size: 497 bytes --]
Hi Kevin,
On Tue, 3 Feb 2015 10:20:02 +0800 Kevin Hao <haokexin@gmail.com> wrote:
>
> I took a second look at this. It seems that there is a declaration of
> struct device_node in linux/device.h and there is also no access to the
> member of device_node in this driver. So we are safe to not include of.h here.
> That is also why I didn't get the build failure for the non-OF archs. :-)
Right.
Seems ok, then.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply
* [PATCH] staging: sm7xxfb: make smtc_scr_info static
From: Max Perepelitsyn @ 2015-02-03 8:44 UTC (permalink / raw)
To: sudipm.mukherjee, teddy.wang, gregkh
Cc: linux-fbdev, devel, linux-kernel, Max Perepelitsyn
This symbol is never used anywhere else besides sm7xxfb.c
Signed-off-by: Max Perepelitsyn <mperepelitsyn@gmail.com>
---
drivers/staging/sm7xxfb/sm7xxfb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/sm7xxfb/sm7xxfb.c b/drivers/staging/sm7xxfb/sm7xxfb.c
index 2ae9fd0..72036c2 100644
--- a/drivers/staging/sm7xxfb/sm7xxfb.c
+++ b/drivers/staging/sm7xxfb/sm7xxfb.c
@@ -111,7 +111,7 @@ static struct vesa_mode vesa_mode_table[] = {
{"0x31B", 1280, 1024, 24},
};
-struct screen_info smtc_scr_info;
+static struct screen_info smtc_scr_info;
/* process command line options, get vga parameter */
static int __init sm7xx_vga_setup(char *options)
--
2.2.2
^ permalink raw reply related
* Re: [PATCH] staging: sm7xxfb: make smtc_scr_info static
From: Sudip Mukherjee @ 2015-02-03 14:16 UTC (permalink / raw)
To: Max Perepelitsyn; +Cc: teddy.wang, gregkh, linux-fbdev, devel, linux-kernel
In-Reply-To: <1422953068-12072-1-git-send-email-mperepelitsyn@gmail.com>
On Tue, Feb 03, 2015 at 02:44:28PM +0600, Max Perepelitsyn wrote:
> This symbol is never used anywhere else besides sm7xxfb.c
Hi Greg,
do i need to do anything about this patch? maybe a tested-by or reviewed-by?
regards
sudip
>
> Signed-off-by: Max Perepelitsyn <mperepelitsyn@gmail.com>
> ---
> drivers/staging/sm7xxfb/sm7xxfb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/sm7xxfb/sm7xxfb.c b/drivers/staging/sm7xxfb/sm7xxfb.c
> index 2ae9fd0..72036c2 100644
> --- a/drivers/staging/sm7xxfb/sm7xxfb.c
> +++ b/drivers/staging/sm7xxfb/sm7xxfb.c
> @@ -111,7 +111,7 @@ static struct vesa_mode vesa_mode_table[] = {
> {"0x31B", 1280, 1024, 24},
> };
>
> -struct screen_info smtc_scr_info;
> +static struct screen_info smtc_scr_info;
>
> /* process command line options, get vga parameter */
> static int __init sm7xx_vga_setup(char *options)
> --
> 2.2.2
>
^ permalink raw reply
* [PATCH 0/2] staging: sm7xxfb: checkpatch cleanup
From: Sudip Mukherjee @ 2015-02-03 14:53 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Sudip Mukherjee, linux-fbdev, devel, linux-kernel
Hi,
Continuing with the checkpatch cleanup, this series will just fix the CamelCase.
Two different patches are made just to make review easier.
Now there is only one checkpatch warning pending about __setup, which will be fixed
in one of the upcoming patch where I will introduce the use of fb_get_options() and
that will also fix the compilation warning of unused function.
thanks
sudip
Sudip Mukherjee (2):
staging: sm7xxfb: fix camelcase
staging: sm7xxfb: fix remaining camelcase
drivers/staging/sm7xxfb/sm7xx.h | 44 ++++++++++++++---------------
drivers/staging/sm7xxfb/sm7xxfb.c | 58 +++++++++++++++++++--------------------
2 files changed, 51 insertions(+), 51 deletions(-)
--
1.8.1.2
^ permalink raw reply
* [PATCH 1/2] staging: sm7xxfb: fix CamelCase
From: Sudip Mukherjee @ 2015-02-03 14:54 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Sudip Mukherjee, linux-fbdev, devel, linux-kernel
In-Reply-To: <1422975214-15250-1-git-send-email-sudipm.mukherjee@gmail.com>
since mixed case names are not encouraged in coding, so those has
been changed to their corresponding lowercase version.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
drivers/staging/sm7xxfb/sm7xx.h | 14 +++++++-------
drivers/staging/sm7xxfb/sm7xxfb.c | 12 ++++++------
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/staging/sm7xxfb/sm7xx.h b/drivers/staging/sm7xxfb/sm7xx.h
index 8599861..fe63cd7 100644
--- a/drivers/staging/sm7xxfb/sm7xx.h
+++ b/drivers/staging/sm7xxfb/sm7xx.h
@@ -29,14 +29,14 @@
#define dac_reg (0x3c8)
#define dac_val (0x3c9)
-extern void __iomem *smtc_RegBaseAddress;
-#define smtc_mmiowb(dat, reg) writeb(dat, smtc_RegBaseAddress + reg)
-#define smtc_mmioww(dat, reg) writew(dat, smtc_RegBaseAddress + reg)
-#define smtc_mmiowl(dat, reg) writel(dat, smtc_RegBaseAddress + reg)
+extern void __iomem *smtc_regbaseaddress;
+#define smtc_mmiowb(dat, reg) writeb(dat, smtc_regbaseaddress + reg)
+#define smtc_mmioww(dat, reg) writew(dat, smtc_regbaseaddress + reg)
+#define smtc_mmiowl(dat, reg) writel(dat, smtc_regbaseaddress + reg)
-#define smtc_mmiorb(reg) readb(smtc_RegBaseAddress + reg)
-#define smtc_mmiorw(reg) readw(smtc_RegBaseAddress + reg)
-#define smtc_mmiorl(reg) readl(smtc_RegBaseAddress + reg)
+#define smtc_mmiorb(reg) readb(smtc_regbaseaddress + reg)
+#define smtc_mmiorw(reg) readw(smtc_regbaseaddress + reg)
+#define smtc_mmiorl(reg) readl(smtc_regbaseaddress + reg)
#define SIZE_SR00_SR04 (0x04 - 0x00 + 1)
#define SIZE_SR10_SR24 (0x24 - 0x10 + 1)
diff --git a/drivers/staging/sm7xxfb/sm7xxfb.c b/drivers/staging/sm7xxfb/sm7xxfb.c
index 2ae9fd0..3150f0b 100644
--- a/drivers/staging/sm7xxfb/sm7xxfb.c
+++ b/drivers/staging/sm7xxfb/sm7xxfb.c
@@ -56,7 +56,7 @@ struct smtcfb_info {
u32 colreg[17];
};
-void __iomem *smtc_RegBaseAddress; /* Memory Map IO starting address */
+void __iomem *smtc_regbaseaddress; /* Memory Map IO starting address */
static struct fb_var_screeninfo smtcfb_var = {
.xres = 1024,
@@ -711,8 +711,8 @@ static void smtc_free_fb_info(struct smtcfb_info *sfb)
static void smtc_unmap_mmio(struct smtcfb_info *sfb)
{
- if (sfb && smtc_RegBaseAddress)
- smtc_RegBaseAddress = NULL;
+ if (sfb && smtc_regbaseaddress)
+ smtc_regbaseaddress = NULL;
}
/*
@@ -823,7 +823,7 @@ static int smtcfb_pci_probe(struct pci_dev *pdev,
#else
sfb->lfb = ioremap(mmio_base, 0x00800000);
#endif
- sfb->mmio = (smtc_RegBaseAddress + sfb->mmio = (smtc_regbaseaddress sfb->lfb + 0x00700000);
sfb->dp_regs = sfb->lfb + 0x00408000;
sfb->vp_regs = sfb->lfb + 0x0040c000;
@@ -833,7 +833,7 @@ static int smtcfb_pci_probe(struct pci_dev *pdev,
dev_info(&pdev->dev, "sfb->lfb=%p", sfb->lfb);
}
#endif
- if (!smtc_RegBaseAddress) {
+ if (!smtc_regbaseaddress) {
dev_err(&pdev->dev,
"%s: unable to map memory mapped IO!",
sfb->fb.fix.id);
@@ -859,7 +859,7 @@ static int smtcfb_pci_probe(struct pci_dev *pdev,
smem_size = SM722_VIDEOMEMORYSIZE;
sfb->dp_regs = ioremap(mmio_base, 0x00a00000);
sfb->lfb = sfb->dp_regs + 0x00200000;
- sfb->mmio = (smtc_RegBaseAddress + sfb->mmio = (smtc_regbaseaddress sfb->dp_regs + 0x000c0000);
sfb->vp_regs = sfb->dp_regs + 0x800;
--
1.8.1.2
^ permalink raw reply related
* [PATCH 2/2] staging: sm7xxfb: fix remaining CamelCase
From: Sudip Mukherjee @ 2015-02-03 14:54 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Sudip Mukherjee, linux-fbdev, devel, linux-kernel
In-Reply-To: <1422975214-15250-1-git-send-email-sudipm.mukherjee@gmail.com>
since mixed case names are not encouraged in coding, so those has
been changed to their corresponding lowercase version.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
drivers/staging/sm7xxfb/sm7xx.h | 30 ++++++++++++-------------
drivers/staging/sm7xxfb/sm7xxfb.c | 46 +++++++++++++++++++--------------------
2 files changed, 38 insertions(+), 38 deletions(-)
diff --git a/drivers/staging/sm7xxfb/sm7xx.h b/drivers/staging/sm7xxfb/sm7xx.h
index fe63cd7..c46e8ca 100644
--- a/drivers/staging/sm7xxfb/sm7xx.h
+++ b/drivers/staging/sm7xxfb/sm7xx.h
@@ -99,27 +99,27 @@ static inline unsigned int smtc_seqr(int reg)
*/
struct ModeInit {
- int mmSizeX;
- int mmSizeY;
+ int mmsizex;
+ int mmsizey;
int bpp;
int hz;
- unsigned char Init_MISC;
- unsigned char Init_SR00_SR04[SIZE_SR00_SR04];
- unsigned char Init_SR10_SR24[SIZE_SR10_SR24];
- unsigned char Init_SR30_SR75[SIZE_SR30_SR75];
- unsigned char Init_SR80_SR93[SIZE_SR80_SR93];
- unsigned char Init_SRA0_SRAF[SIZE_SRA0_SRAF];
- unsigned char Init_GR00_GR08[SIZE_GR00_GR08];
- unsigned char Init_AR00_AR14[SIZE_AR00_AR14];
- unsigned char Init_CR00_CR18[SIZE_CR00_CR18];
- unsigned char Init_CR30_CR4D[SIZE_CR30_CR4D];
- unsigned char Init_CR90_CRA7[SIZE_CR90_CRA7];
+ unsigned char init_misc;
+ unsigned char init_sr00_sr04[SIZE_SR00_SR04];
+ unsigned char init_sr10_sr24[SIZE_SR10_SR24];
+ unsigned char init_sr30_sr75[SIZE_SR30_SR75];
+ unsigned char init_sr80_sr93[SIZE_SR80_SR93];
+ unsigned char init_sra0_sraf[SIZE_SRA0_SRAF];
+ unsigned char init_gr00_gr08[SIZE_GR00_GR08];
+ unsigned char init_ar00_ar14[SIZE_AR00_AR14];
+ unsigned char init_cr00_cr18[SIZE_CR00_CR18];
+ unsigned char init_cr30_cr4d[SIZE_CR30_CR4D];
+ unsigned char init_cr90_cra7[SIZE_CR90_CRA7];
};
/**********************************************************************
SM712 Mode table.
**********************************************************************/
-struct ModeInit VGAMode[] = {
+struct ModeInit vgamode[] = {
{
/* mode#0: 640 x 480 16Bpp 60Hz */
640, 480, 16, 60,
@@ -776,4 +776,4 @@ struct ModeInit VGAMode[] = {
},
};
-#define numVGAModes ARRAY_SIZE(VGAMode)
+#define numvgamodes ARRAY_SIZE(vgamode)
diff --git a/drivers/staging/sm7xxfb/sm7xxfb.c b/drivers/staging/sm7xxfb/sm7xxfb.c
index 3150f0b..4cab961 100644
--- a/drivers/staging/sm7xxfb/sm7xxfb.c
+++ b/drivers/staging/sm7xxfb/sm7xxfb.c
@@ -470,38 +470,38 @@ smtcfb_write(struct fb_info *info, const char __user *buf, size_t count,
static void sm7xx_set_timing(struct smtcfb_info *sfb)
{
int i = 0, j = 0;
- u32 m_nScreenStride;
+ u32 m_nscreenstride;
dev_dbg(&sfb->pdev->dev,
"sfb->width=%d sfb->height=%d sfb->fb.var.bits_per_pixel=%d sfb->hz=%d\n",
sfb->width, sfb->height, sfb->fb.var.bits_per_pixel, sfb->hz);
- for (j = 0; j < numVGAModes; j++) {
- if (VGAMode[j].mmSizeX = sfb->width &&
- VGAMode[j].mmSizeY = sfb->height &&
- VGAMode[j].bpp = sfb->fb.var.bits_per_pixel &&
- VGAMode[j].hz = sfb->hz) {
+ for (j = 0; j < numvgamodes; j++) {
+ if (vgamode[j].mmsizex = sfb->width &&
+ vgamode[j].mmsizey = sfb->height &&
+ vgamode[j].bpp = sfb->fb.var.bits_per_pixel &&
+ vgamode[j].hz = sfb->hz) {
dev_dbg(&sfb->pdev->dev,
- "VGAMode[j].mmSizeX=%d VGAMode[j].mmSizeY=%d VGAMode[j].bpp=%d VGAMode[j].hz=%d\n",
- VGAMode[j].mmSizeX, VGAMode[j].mmSizeY,
- VGAMode[j].bpp, VGAMode[j].hz);
+ "vgamode[j].mmsizex=%d vgamode[j].mmSizeY=%d vgamode[j].bpp=%d vgamode[j].hz=%d\n",
+ vgamode[j].mmsizex, vgamode[j].mmsizey,
+ vgamode[j].bpp, vgamode[j].hz);
- dev_dbg(&sfb->pdev->dev, "VGAMode index=%d\n", j);
+ dev_dbg(&sfb->pdev->dev, "vgamode index=%d\n", j);
smtc_mmiowb(0x0, 0x3c6);
smtc_seqw(0, 0x1);
- smtc_mmiowb(VGAMode[j].Init_MISC, 0x3c2);
+ smtc_mmiowb(vgamode[j].init_misc, 0x3c2);
/* init SEQ register SR00 - SR04 */
for (i = 0; i < SIZE_SR00_SR04; i++)
- smtc_seqw(i, VGAMode[j].Init_SR00_SR04[i]);
+ smtc_seqw(i, vgamode[j].init_sr00_sr04[i]);
/* init SEQ register SR10 - SR24 */
for (i = 0; i < SIZE_SR10_SR24; i++)
smtc_seqw(i + 0x10,
- VGAMode[j].Init_SR10_SR24[i]);
+ vgamode[j].init_sr10_sr24[i]);
/* init SEQ register SR30 - SR75 */
for (i = 0; i < SIZE_SR30_SR75; i++)
@@ -509,39 +509,39 @@ static void sm7xx_set_timing(struct smtcfb_info *sfb)
(i + 0x30) != 0x6a &&
(i + 0x30) != 0x6b)
smtc_seqw(i + 0x30,
- VGAMode[j].Init_SR30_SR75[i]);
+ vgamode[j].init_sr30_sr75[i]);
/* init SEQ register SR80 - SR93 */
for (i = 0; i < SIZE_SR80_SR93; i++)
smtc_seqw(i + 0x80,
- VGAMode[j].Init_SR80_SR93[i]);
+ vgamode[j].init_sr80_sr93[i]);
/* init SEQ register SRA0 - SRAF */
for (i = 0; i < SIZE_SRA0_SRAF; i++)
smtc_seqw(i + 0xa0,
- VGAMode[j].Init_SRA0_SRAF[i]);
+ vgamode[j].init_sra0_sraf[i]);
/* init Graphic register GR00 - GR08 */
for (i = 0; i < SIZE_GR00_GR08; i++)
- smtc_grphw(i, VGAMode[j].Init_GR00_GR08[i]);
+ smtc_grphw(i, vgamode[j].init_gr00_gr08[i]);
/* init Attribute register AR00 - AR14 */
for (i = 0; i < SIZE_AR00_AR14; i++)
- smtc_attrw(i, VGAMode[j].Init_AR00_AR14[i]);
+ smtc_attrw(i, vgamode[j].init_ar00_ar14[i]);
/* init CRTC register CR00 - CR18 */
for (i = 0; i < SIZE_CR00_CR18; i++)
- smtc_crtcw(i, VGAMode[j].Init_CR00_CR18[i]);
+ smtc_crtcw(i, vgamode[j].init_cr00_cr18[i]);
/* init CRTC register CR30 - CR4D */
for (i = 0; i < SIZE_CR30_CR4D; i++)
smtc_crtcw(i + 0x30,
- VGAMode[j].Init_CR30_CR4D[i]);
+ vgamode[j].init_cr30_cr4d[i]);
/* init CRTC register CR90 - CRA7 */
for (i = 0; i < SIZE_CR90_CRA7; i++)
smtc_crtcw(i + 0x90,
- VGAMode[j].Init_CR90_CRA7[i]);
+ vgamode[j].init_cr90_cra7[i]);
}
}
smtc_mmiowb(0x67, 0x3c2);
@@ -551,7 +551,7 @@ static void sm7xx_set_timing(struct smtcfb_info *sfb)
writel(0x0, sfb->vp_regs + 0x40);
/* set data width */
- m_nScreenStride + m_nscreenstride (sfb->width * sfb->fb.var.bits_per_pixel) / 64;
switch (sfb->fb.var.bits_per_pixel) {
case 8:
@@ -567,7 +567,7 @@ static void sm7xx_set_timing(struct smtcfb_info *sfb)
writel(0x00030000, sfb->vp_regs + 0x0);
break;
}
- writel((u32) (((m_nScreenStride + 2) << 16) | m_nScreenStride),
+ writel((u32) (((m_nscreenstride + 2) << 16) | m_nscreenstride),
sfb->vp_regs + 0x10);
}
--
1.8.1.2
^ permalink raw reply related
* Re: [PATCH] staging: sm7xxfb: make smtc_scr_info static
From: Greg KH @ 2015-02-03 15:38 UTC (permalink / raw)
To: Sudip Mukherjee
Cc: Max Perepelitsyn, devel, linux-fbdev, teddy.wang, linux-kernel
In-Reply-To: <20150203140401.GA12697@sudip-PC>
On Tue, Feb 03, 2015 at 07:34:01PM +0530, Sudip Mukherjee wrote:
> On Tue, Feb 03, 2015 at 02:44:28PM +0600, Max Perepelitsyn wrote:
> > This symbol is never used anywhere else besides sm7xxfb.c
>
> Hi Greg,
> do i need to do anything about this patch? maybe a tested-by or reviewed-by?
If you test or review it, yes, please add such a line to an email and
reply to the patch with it.
thanks,
greg k-h
^ permalink raw reply
* Re: [PATCH] staging: sm7xxfb: make smtc_scr_info static
From: Sudip Mukherjee @ 2015-02-03 17:44 UTC (permalink / raw)
To: Max Perepelitsyn; +Cc: teddy.wang, gregkh, linux-fbdev, devel, linux-kernel
In-Reply-To: <1422953068-12072-1-git-send-email-mperepelitsyn@gmail.com>
On Tue, Feb 03, 2015 at 02:44:28PM +0600, Max Perepelitsyn wrote:
> This symbol is never used anywhere else besides sm7xxfb.c
>
> Signed-off-by: Max Perepelitsyn <mperepelitsyn@gmail.com>
Tested-by: Sudip Mukherjee <sudip@vectorindia.org>
> ---
> drivers/staging/sm7xxfb/sm7xxfb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/sm7xxfb/sm7xxfb.c b/drivers/staging/sm7xxfb/sm7xxfb.c
> index 2ae9fd0..72036c2 100644
> --- a/drivers/staging/sm7xxfb/sm7xxfb.c
> +++ b/drivers/staging/sm7xxfb/sm7xxfb.c
> @@ -111,7 +111,7 @@ static struct vesa_mode vesa_mode_table[] = {
> {"0x31B", 1280, 1024, 24},
> };
>
> -struct screen_info smtc_scr_info;
> +static struct screen_info smtc_scr_info;
>
> /* process command line options, get vga parameter */
> static int __init sm7xx_vga_setup(char *options)
> --
> 2.2.2
>
^ permalink raw reply
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