Commit d3467277 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'fbdev-for-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev

Pull fbdev updates from Helge Deller:
 "Code cleanups for offb, shmobile, sisfb, savage, au1200fb, uvesafb,
  omap2 and sh7760fb, as well as the addition of some HAS_IOPORT
  dependencies and adjustment of generated logo file to make build
  reproducible"

* tag 'fbdev-for-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev:
  fbdev: offb: replace of_node_put with __free(device_node)
  fbdev: savage: Handle err return when savagefb_check_var failed
  video: hdmi: prefer length specifier in format over string copying
  fbdev: uvesafb: replace deprecated strncpy with strscpy_pad
  fbdev: au1200fb: replace deprecated strncpy with strscpy
  fbdev: fsl-diu-fb: replace deprecated strncpy with strscpy_pad
  video: logo: Drop full path of the input filename in generated file
  fbdev: add HAS_IOPORT dependencies
  fbdev: sh7760fb: allow modular build
  fbdev: sisfb: hide unused variables
  fbdev: shmobile: fix snprintf truncation
  fbdev: omap2: replace of_graph_get_next_endpoint()
parents db5d28c0 ce4a7ae8
...@@ -157,7 +157,7 @@ config FB_IMX ...@@ -157,7 +157,7 @@ config FB_IMX
config FB_CYBER2000 config FB_CYBER2000
tristate "CyberPro 2000/2010/5000 support" tristate "CyberPro 2000/2010/5000 support"
depends on FB && PCI && (BROKEN || !SPARC64) depends on FB && PCI && HAS_IOPORT && (BROKEN || !SPARC64)
select FB_IOMEM_HELPERS select FB_IOMEM_HELPERS
help help
This enables support for the Integraphics CyberPro 20x0 and 5000 This enables support for the Integraphics CyberPro 20x0 and 5000
...@@ -245,7 +245,7 @@ config FB_FM2 ...@@ -245,7 +245,7 @@ config FB_FM2
config FB_ARC config FB_ARC
tristate "Arc Monochrome LCD board support" tristate "Arc Monochrome LCD board support"
depends on FB && (X86 || COMPILE_TEST) depends on FB && HAS_IOPORT && (X86 || COMPILE_TEST)
select FB_SYSMEM_HELPERS_DEFERRED select FB_SYSMEM_HELPERS_DEFERRED
help help
This enables support for the Arc Monochrome LCD board. The board This enables support for the Arc Monochrome LCD board. The board
...@@ -1046,7 +1046,7 @@ config FB_ATY_BACKLIGHT ...@@ -1046,7 +1046,7 @@ config FB_ATY_BACKLIGHT
config FB_S3 config FB_S3
tristate "S3 Trio/Virge support" tristate "S3 Trio/Virge support"
depends on FB && PCI depends on FB && PCI && HAS_IOPORT
select FB_CFB_FILLRECT select FB_CFB_FILLRECT
select FB_CFB_COPYAREA select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT select FB_CFB_IMAGEBLIT
...@@ -1107,7 +1107,7 @@ config FB_SAVAGE_ACCEL ...@@ -1107,7 +1107,7 @@ config FB_SAVAGE_ACCEL
config FB_SIS config FB_SIS
tristate "SiS/XGI display support" tristate "SiS/XGI display support"
depends on FB && PCI depends on FB && PCI && HAS_IOPORT
select BOOT_VESA_SUPPORT if FB_SIS = y select BOOT_VESA_SUPPORT if FB_SIS = y
select FB_CFB_FILLRECT select FB_CFB_FILLRECT
select FB_CFB_COPYAREA select FB_CFB_COPYAREA
...@@ -1138,7 +1138,7 @@ config FB_SIS_315 ...@@ -1138,7 +1138,7 @@ config FB_SIS_315
config FB_VIA config FB_VIA
tristate "VIA UniChrome (Pro) and Chrome9 display support" tristate "VIA UniChrome (Pro) and Chrome9 display support"
depends on FB && PCI && GPIOLIB && I2C && (X86 || COMPILE_TEST) depends on FB && PCI && GPIOLIB && I2C && HAS_IOPORT && (X86 || COMPILE_TEST)
select FB_CFB_FILLRECT select FB_CFB_FILLRECT
select FB_CFB_COPYAREA select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT select FB_CFB_IMAGEBLIT
...@@ -1177,7 +1177,7 @@ endif ...@@ -1177,7 +1177,7 @@ endif
config FB_NEOMAGIC config FB_NEOMAGIC
tristate "NeoMagic display support" tristate "NeoMagic display support"
depends on FB && PCI depends on FB && PCI && HAS_IOPORT
select FB_CFB_FILLRECT select FB_CFB_FILLRECT
select FB_CFB_COPYAREA select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT select FB_CFB_IMAGEBLIT
...@@ -1204,7 +1204,7 @@ config FB_KYRO ...@@ -1204,7 +1204,7 @@ config FB_KYRO
config FB_3DFX config FB_3DFX
tristate "3Dfx Banshee/Voodoo3/Voodoo5 display support" tristate "3Dfx Banshee/Voodoo3/Voodoo5 display support"
depends on FB && PCI depends on FB && PCI && HAS_IOPORT
select FB_CFB_FILLRECT select FB_CFB_FILLRECT
select FB_CFB_COPYAREA select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT select FB_CFB_IMAGEBLIT
...@@ -1252,7 +1252,7 @@ config FB_VOODOO1 ...@@ -1252,7 +1252,7 @@ config FB_VOODOO1
config FB_VT8623 config FB_VT8623
tristate "VIA VT8623 support" tristate "VIA VT8623 support"
depends on FB && PCI depends on FB && PCI && HAS_IOPORT
select FB_CFB_FILLRECT select FB_CFB_FILLRECT
select FB_CFB_COPYAREA select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT select FB_CFB_IMAGEBLIT
...@@ -1267,7 +1267,7 @@ config FB_VT8623 ...@@ -1267,7 +1267,7 @@ config FB_VT8623
config FB_TRIDENT config FB_TRIDENT
tristate "Trident/CyberXXX/CyberBlade support" tristate "Trident/CyberXXX/CyberBlade support"
depends on FB && PCI depends on FB && PCI && HAS_IOPORT
select FB_CFB_FILLRECT select FB_CFB_FILLRECT
select FB_CFB_COPYAREA select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT select FB_CFB_IMAGEBLIT
...@@ -1290,7 +1290,7 @@ config FB_TRIDENT ...@@ -1290,7 +1290,7 @@ config FB_TRIDENT
config FB_ARK config FB_ARK
tristate "ARK 2000PV support" tristate "ARK 2000PV support"
depends on FB && PCI depends on FB && PCI && HAS_IOPORT
select FB_CFB_FILLRECT select FB_CFB_FILLRECT
select FB_CFB_COPYAREA select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT select FB_CFB_IMAGEBLIT
...@@ -1648,8 +1648,8 @@ config FB_COBALT ...@@ -1648,8 +1648,8 @@ config FB_COBALT
select FB_IOMEM_HELPERS select FB_IOMEM_HELPERS
config FB_SH7760 config FB_SH7760
bool "SH7760/SH7763/SH7720/SH7721 LCDC support" tristate "SH7760/SH7763/SH7720/SH7721 LCDC support"
depends on FB=y && (CPU_SUBTYPE_SH7760 || CPU_SUBTYPE_SH7763 \ depends on FB && (CPU_SUBTYPE_SH7760 || CPU_SUBTYPE_SH7763 \
|| CPU_SUBTYPE_SH7720 || CPU_SUBTYPE_SH7721) || CPU_SUBTYPE_SH7720 || CPU_SUBTYPE_SH7721)
select FB_IOMEM_HELPERS select FB_IOMEM_HELPERS
help help
...@@ -1814,7 +1814,7 @@ config FB_SSD1307 ...@@ -1814,7 +1814,7 @@ config FB_SSD1307
config FB_SM712 config FB_SM712
tristate "Silicon Motion SM712 framebuffer support" tristate "Silicon Motion SM712 framebuffer support"
depends on FB && PCI depends on FB && PCI && HAS_IOPORT
select FB_IOMEM_HELPERS select FB_IOMEM_HELPERS
help help
Frame buffer driver for the Silicon Motion SM710, SM712, SM721 Frame buffer driver for the Silicon Motion SM710, SM712, SM721
......
...@@ -1557,7 +1557,7 @@ static int au1200fb_init_fbinfo(struct au1200fb_device *fbdev) ...@@ -1557,7 +1557,7 @@ static int au1200fb_init_fbinfo(struct au1200fb_device *fbdev)
return ret; return ret;
} }
strncpy(fbi->fix.id, "AU1200", sizeof(fbi->fix.id)); strscpy(fbi->fix.id, "AU1200");
fbi->fix.smem_start = fbdev->fb_phys; fbi->fix.smem_start = fbdev->fb_phys;
fbi->fix.smem_len = fbdev->fb_len; fbi->fix.smem_len = fbdev->fb_len;
fbi->fix.type = FB_TYPE_PACKED_PIXELS; fbi->fix.type = FB_TYPE_PACKED_PIXELS;
......
...@@ -787,7 +787,7 @@ static void set_fix(struct fb_info *info) ...@@ -787,7 +787,7 @@ static void set_fix(struct fb_info *info)
struct fb_var_screeninfo *var = &info->var; struct fb_var_screeninfo *var = &info->var;
struct mfb_info *mfbi = info->par; struct mfb_info *mfbi = info->par;
strncpy(fix->id, mfbi->id, sizeof(fix->id)); strscpy_pad(fix->id, mfbi->id);
fix->line_length = var->xres_virtual * var->bits_per_pixel / 8; fix->line_length = var->xres_virtual * var->bits_per_pixel / 8;
fix->type = FB_TYPE_PACKED_PIXELS; fix->type = FB_TYPE_PACKED_PIXELS;
fix->accel = FB_ACCEL_NONE; fix->accel = FB_ACCEL_NONE;
......
...@@ -357,7 +357,7 @@ static void offb_init_palette_hacks(struct fb_info *info, struct device_node *dp ...@@ -357,7 +357,7 @@ static void offb_init_palette_hacks(struct fb_info *info, struct device_node *dp
par->cmap_type = cmap_gxt2000; par->cmap_type = cmap_gxt2000;
} else if (of_node_name_prefix(dp, "vga,Display-")) { } else if (of_node_name_prefix(dp, "vga,Display-")) {
/* Look for AVIVO initialized by SLOF */ /* Look for AVIVO initialized by SLOF */
struct device_node *pciparent = of_get_parent(dp); struct device_node *pciparent __free(device_node) = of_get_parent(dp);
const u32 *vid, *did; const u32 *vid, *did;
vid = of_get_property(pciparent, "vendor-id", NULL); vid = of_get_property(pciparent, "vendor-id", NULL);
did = of_get_property(pciparent, "device-id", NULL); did = of_get_property(pciparent, "device-id", NULL);
...@@ -369,7 +369,6 @@ static void offb_init_palette_hacks(struct fb_info *info, struct device_node *dp ...@@ -369,7 +369,6 @@ static void offb_init_palette_hacks(struct fb_info *info, struct device_node *dp
if (par->cmap_adr) if (par->cmap_adr)
par->cmap_type = cmap_avivo; par->cmap_type = cmap_avivo;
} }
of_node_put(pciparent);
} else if (dp && of_device_is_compatible(dp, "qemu,std-vga")) { } else if (dp && of_device_is_compatible(dp, "qemu,std-vga")) {
#ifdef __BIG_ENDIAN #ifdef __BIG_ENDIAN
const __be32 io_of_addr[3] = { 0x01000000, 0x0, 0x0 }; const __be32 io_of_addr[3] = { 0x01000000, 0x0, 0x0 };
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <linux/debugfs.h> #include <linux/debugfs.h>
#include <linux/pm_runtime.h> #include <linux/pm_runtime.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_graph.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <linux/component.h> #include <linux/component.h>
...@@ -5079,7 +5080,7 @@ static int dsi_probe_of(struct platform_device *pdev) ...@@ -5079,7 +5080,7 @@ static int dsi_probe_of(struct platform_device *pdev)
struct device_node *ep; struct device_node *ep;
struct omap_dsi_pin_config pin_cfg; struct omap_dsi_pin_config pin_cfg;
ep = omapdss_of_get_first_endpoint(node); ep = of_graph_get_endpoint_by_regs(node, 0, -1);
if (!ep) if (!ep)
return 0; return 0;
......
...@@ -130,24 +130,6 @@ static struct device_node *omapdss_of_get_remote_port(const struct device_node * ...@@ -130,24 +130,6 @@ static struct device_node *omapdss_of_get_remote_port(const struct device_node *
return np; return np;
} }
struct device_node *
omapdss_of_get_first_endpoint(const struct device_node *parent)
{
struct device_node *port, *ep;
port = omapdss_of_get_next_port(parent, NULL);
if (!port)
return NULL;
ep = omapdss_of_get_next_endpoint(port, NULL);
of_node_put(port);
return ep;
}
EXPORT_SYMBOL_GPL(omapdss_of_get_first_endpoint);
struct omap_dss_device * struct omap_dss_device *
omapdss_of_find_source_for_first_ep(struct device_node *node) omapdss_of_find_source_for_first_ep(struct device_node *node)
{ {
...@@ -155,7 +137,7 @@ omapdss_of_find_source_for_first_ep(struct device_node *node) ...@@ -155,7 +137,7 @@ omapdss_of_find_source_for_first_ep(struct device_node *node)
struct device_node *src_port; struct device_node *src_port;
struct omap_dss_device *src; struct omap_dss_device *src;
ep = omapdss_of_get_first_endpoint(node); ep = of_graph_get_endpoint_by_regs(node, 0, -1);
if (!ep) if (!ep)
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <linux/pm_runtime.h> #include <linux/pm_runtime.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_graph.h>
#include <linux/regulator/consumer.h> #include <linux/regulator/consumer.h>
#include <linux/component.h> #include <linux/component.h>
#include <video/omapfb_dss.h> #include <video/omapfb_dss.h>
...@@ -529,7 +530,7 @@ static int hdmi_probe_of(struct platform_device *pdev) ...@@ -529,7 +530,7 @@ static int hdmi_probe_of(struct platform_device *pdev)
struct device_node *ep; struct device_node *ep;
int r; int r;
ep = omapdss_of_get_first_endpoint(node); ep = of_graph_get_endpoint_by_regs(node, 0, -1);
if (!ep) if (!ep)
return 0; return 0;
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <linux/pm_runtime.h> #include <linux/pm_runtime.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_graph.h>
#include <linux/regulator/consumer.h> #include <linux/regulator/consumer.h>
#include <linux/component.h> #include <linux/component.h>
#include <video/omapfb_dss.h> #include <video/omapfb_dss.h>
...@@ -561,7 +562,7 @@ static int hdmi_probe_of(struct platform_device *pdev) ...@@ -561,7 +562,7 @@ static int hdmi_probe_of(struct platform_device *pdev)
struct device_node *ep; struct device_node *ep;
int r; int r;
ep = omapdss_of_get_first_endpoint(node); ep = of_graph_get_endpoint_by_regs(node, 0, -1);
if (!ep) if (!ep)
return 0; return 0;
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <linux/regulator/consumer.h> #include <linux/regulator/consumer.h>
#include <linux/pm_runtime.h> #include <linux/pm_runtime.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_graph.h>
#include <linux/component.h> #include <linux/component.h>
#include <video/omapfb_dss.h> #include <video/omapfb_dss.h>
...@@ -764,7 +765,7 @@ static int venc_probe_of(struct platform_device *pdev) ...@@ -764,7 +765,7 @@ static int venc_probe_of(struct platform_device *pdev)
u32 channels; u32 channels;
int r; int r;
ep = omapdss_of_get_first_endpoint(node); ep = of_graph_get_endpoint_by_regs(node, 0, -1);
if (!ep) if (!ep)
return 0; return 0;
......
...@@ -2171,7 +2171,7 @@ static int of_get_pxafb_mode_info(struct device *dev, ...@@ -2171,7 +2171,7 @@ static int of_get_pxafb_mode_info(struct device *dev,
u32 bus_width; u32 bus_width;
int ret, i; int ret, i;
np = of_graph_get_next_endpoint(dev->of_node, NULL); np = of_graph_get_endpoint_by_regs(dev->of_node, 0, -1);
if (!np) { if (!np) {
dev_err(dev, "could not find endpoint\n"); dev_err(dev, "could not find endpoint\n");
return -EINVAL; return -EINVAL;
......
...@@ -2276,7 +2276,10 @@ static int savagefb_probe(struct pci_dev *dev, const struct pci_device_id *id) ...@@ -2276,7 +2276,10 @@ static int savagefb_probe(struct pci_dev *dev, const struct pci_device_id *id)
if (info->var.xres_virtual > 0x1000) if (info->var.xres_virtual > 0x1000)
info->var.xres_virtual = 0x1000; info->var.xres_virtual = 0x1000;
#endif #endif
savagefb_check_var(&info->var, info); err = savagefb_check_var(&info->var, info);
if (err)
goto failed;
savagefb_set_fix(info); savagefb_set_fix(info);
/* /*
......
...@@ -1575,7 +1575,7 @@ sh_mobile_lcdc_overlay_fb_init(struct sh_mobile_lcdc_overlay *ovl) ...@@ -1575,7 +1575,7 @@ sh_mobile_lcdc_overlay_fb_init(struct sh_mobile_lcdc_overlay *ovl)
*/ */
info->fix = sh_mobile_lcdc_overlay_fix; info->fix = sh_mobile_lcdc_overlay_fix;
snprintf(info->fix.id, sizeof(info->fix.id), snprintf(info->fix.id, sizeof(info->fix.id),
"SH Mobile LCDC Overlay %u", ovl->index); "SHMobile ovl %u", ovl->index);
info->fix.smem_start = ovl->dma_handle; info->fix.smem_start = ovl->dma_handle;
info->fix.smem_len = ovl->fb_size; info->fix.smem_len = ovl->fb_size;
info->fix.line_length = ovl->pitch; info->fix.line_length = ovl->pitch;
......
...@@ -172,7 +172,7 @@ static const unsigned char SiS_HiTVGroup3_2[] = { ...@@ -172,7 +172,7 @@ static const unsigned char SiS_HiTVGroup3_2[] = {
}; };
/* 301C / 302ELV extended Part2 TV registers (4 tap scaler) */ /* 301C / 302ELV extended Part2 TV registers (4 tap scaler) */
#ifdef CONFIG_FB_SIS_315
static const unsigned char SiS_Part2CLVX_1[] = { static const unsigned char SiS_Part2CLVX_1[] = {
0x00,0x00, 0x00,0x00,
0x00,0x20,0x00,0x00,0x7F,0x20,0x02,0x7F,0x7D,0x20,0x04,0x7F,0x7D,0x1F,0x06,0x7E, 0x00,0x20,0x00,0x00,0x7F,0x20,0x02,0x7F,0x7D,0x20,0x04,0x7F,0x7D,0x1F,0x06,0x7E,
...@@ -245,7 +245,6 @@ static const unsigned char SiS_Part2CLVX_6[] = { /* 1080i */ ...@@ -245,7 +245,6 @@ static const unsigned char SiS_Part2CLVX_6[] = { /* 1080i */
0xFF,0xFF, 0xFF,0xFF,
}; };
#ifdef CONFIG_FB_SIS_315
/* 661 et al LCD data structure (2.03.00) */ /* 661 et al LCD data structure (2.03.00) */
static const unsigned char SiS_LCDStruct661[] = { static const unsigned char SiS_LCDStruct661[] = {
/* 1024x768 */ /* 1024x768 */
......
...@@ -1867,7 +1867,7 @@ static ssize_t v86d_show(struct device_driver *dev, char *buf) ...@@ -1867,7 +1867,7 @@ static ssize_t v86d_show(struct device_driver *dev, char *buf)
static ssize_t v86d_store(struct device_driver *dev, const char *buf, static ssize_t v86d_store(struct device_driver *dev, const char *buf,
size_t count) size_t count)
{ {
strncpy(v86d_path, buf, PATH_MAX - 1); strscpy_pad(v86d_path, buf);
return count; return count;
} }
static DRIVER_ATTR_RW(v86d); static DRIVER_ATTR_RW(v86d);
......
...@@ -1310,17 +1310,11 @@ static void hdmi_spd_infoframe_log(const char *level, ...@@ -1310,17 +1310,11 @@ static void hdmi_spd_infoframe_log(const char *level,
struct device *dev, struct device *dev,
const struct hdmi_spd_infoframe *frame) const struct hdmi_spd_infoframe *frame)
{ {
u8 buf[17];
hdmi_infoframe_log_header(level, dev, hdmi_infoframe_log_header(level, dev,
(const struct hdmi_any_infoframe *)frame); (const struct hdmi_any_infoframe *)frame);
memset(buf, 0, sizeof(buf)); hdmi_log(" vendor: %.8s\n", frame->vendor);
hdmi_log(" product: %.16s\n", frame->product);
strncpy(buf, frame->vendor, 8);
hdmi_log(" vendor: %s\n", buf);
strncpy(buf, frame->product, 16);
hdmi_log(" product: %s\n", buf);
hdmi_log(" source device information: %s (0x%x)\n", hdmi_log(" source device information: %s (0x%x)\n",
hdmi_spd_sdi_get_name(frame->sdi), frame->sdi); hdmi_spd_sdi_get_name(frame->sdi), frame->sdi);
} }
......
...@@ -235,8 +235,6 @@ static void write_header(void) ...@@ -235,8 +235,6 @@ static void write_header(void)
fputs("/*\n", out); fputs("/*\n", out);
fputs(" * DO NOT EDIT THIS FILE!\n", out); fputs(" * DO NOT EDIT THIS FILE!\n", out);
fputs(" *\n", out); fputs(" *\n", out);
fprintf(out, " * It was automatically generated from %s\n", filename);
fputs(" *\n", out);
fprintf(out, " * Linux logo %s\n", logoname); fprintf(out, " * Linux logo %s\n", logoname);
fputs(" */\n\n", out); fputs(" */\n\n", out);
fputs("#include <linux/linux_logo.h>\n\n", out); fputs("#include <linux/linux_logo.h>\n\n", out);
......
...@@ -819,9 +819,6 @@ struct device_node * ...@@ -819,9 +819,6 @@ struct device_node *
omapdss_of_get_next_endpoint(const struct device_node *parent, omapdss_of_get_next_endpoint(const struct device_node *parent,
struct device_node *prev); struct device_node *prev);
struct device_node *
omapdss_of_get_first_endpoint(const struct device_node *parent);
struct omap_dss_device * struct omap_dss_device *
omapdss_of_find_source_for_first_ep(struct device_node *node); omapdss_of_find_source_for_first_ep(struct device_node *node);
#else #else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment