Skip to content

Commit

Permalink
Merge tag 'fbdev-for-6.14-rc1' of git://git.kernel.org/pub/scm/linux/…
Browse files Browse the repository at this point in the history
…kernel/git/deller/linux-fbdev

Pull fbdev updates from Helge Deller:
 "Fixes:
   - omap: use threaded IRQ for LCD DMA
   - omapfb: Fix an OF node leak in dss_of_port_get_parent_device()
   - vga16fb: fix orig_video_isVGA confusion

  Updates & cleanups:
   - hdmi: Remove unused hdmi_infoframe_check
   - omapfb:
       - Remove unused hdmi5_core_handle_irqs
       - Use of_property_present() to test existence of DT property
       - Use syscon_regmap_lookup_by_phandle_args
   - efifb: Change the return value type to void
   - lcdcfb: Use backlight helper
   - udlfb: Use const 'struct bin_attribute' callback
   - radeon: Use const 'struct bin_attribute' callbacks
   - sm501fb: Use str_enabled_disabled() helper in sm501fb_init_fb()"

* tag 'fbdev-for-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev:
  fbdev: lcdcfb: Use backlight helper
  fbdev: vga16fb: fix orig_video_isVGA confusion
  fbdev: omapfb: Use syscon_regmap_lookup_by_phandle_args
  fbdev: omapfb: Use of_property_present() to test existence of DT property
  fbdev: sm501fb: Use str_enabled_disabled() helper in sm501fb_init_fb()
  fbdev: omap: use threaded IRQ for LCD DMA
  fbdev: omapfb: Fix an OF node leak in dss_of_port_get_parent_device()
  fbdev: efifb: Change the return value type to void
  fbdev: omapfb: Remove unused hdmi5_core_handle_irqs
  video: hdmi: Remove unused hdmi_infoframe_check
  fbdev: radeon: Use const 'struct bin_attribute' callbacks
  fbdev: udlfb: Use const 'struct bin_attribute' callback
  • Loading branch information
torvalds committed Jan 24, 2025
2 parents ab18b8f + d08e783 commit ac0761d
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 78 deletions.
8 changes: 4 additions & 4 deletions drivers/video/fbdev/aty/radeon_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -2199,7 +2199,7 @@ static ssize_t radeon_show_one_edid(char *buf, loff_t off, size_t count, const u


static ssize_t radeon_show_edid1(struct file *filp, struct kobject *kobj,
struct bin_attribute *bin_attr,
const struct bin_attribute *bin_attr,
char *buf, loff_t off, size_t count)
{
struct device *dev = kobj_to_dev(kobj);
Expand All @@ -2211,7 +2211,7 @@ static ssize_t radeon_show_edid1(struct file *filp, struct kobject *kobj,


static ssize_t radeon_show_edid2(struct file *filp, struct kobject *kobj,
struct bin_attribute *bin_attr,
const struct bin_attribute *bin_attr,
char *buf, loff_t off, size_t count)
{
struct device *dev = kobj_to_dev(kobj);
Expand All @@ -2227,7 +2227,7 @@ static const struct bin_attribute edid1_attr = {
.mode = 0444,
},
.size = EDID_LENGTH,
.read = radeon_show_edid1,
.read_new = radeon_show_edid1,
};

static const struct bin_attribute edid2_attr = {
Expand All @@ -2236,7 +2236,7 @@ static const struct bin_attribute edid2_attr = {
.mode = 0444,
},
.size = EDID_LENGTH,
.read = radeon_show_edid2,
.read_new = radeon_show_edid2,
};

static int radeonfb_pci_register(struct pci_dev *pdev,
Expand Down
4 changes: 1 addition & 3 deletions drivers/video/fbdev/efifb.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ static const struct fb_ops efifb_ops = {
.fb_setcolreg = efifb_setcolreg,
};

static int efifb_setup(struct screen_info *si, char *options)
static void efifb_setup(struct screen_info *si, char *options)
{
char *this_opt;

Expand All @@ -299,8 +299,6 @@ static int efifb_setup(struct screen_info *si, char *options)
use_bgrt = false;
}
}

return 0;
}

static inline bool fb_base_is_valid(struct screen_info *si)
Expand Down
4 changes: 2 additions & 2 deletions drivers/video/fbdev/omap/lcd_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,8 @@ static int __init omap_init_lcd_dma(void)

spin_lock_init(&lcd_dma.lock);

r = request_irq(INT_DMA_LCD, lcd_dma_irq_handler, 0,
"LCD DMA", NULL);
r = request_threaded_irq(INT_DMA_LCD, NULL, lcd_dma_irq_handler,
IRQF_ONESHOT, "LCD DMA", NULL);
if (r != 0)
pr_err("unable to request IRQ for LCD DMA (error %d)\n", r);

Expand Down
11 changes: 3 additions & 8 deletions drivers/video/fbdev/omap2/omapfb/dss/dispc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3933,18 +3933,13 @@ static int dispc_bind(struct device *dev, struct device *master, void *data)
return -ENODEV;
}

if (np && of_property_read_bool(np, "syscon-pol")) {
dispc.syscon_pol = syscon_regmap_lookup_by_phandle(np, "syscon-pol");
if (np && of_property_present(np, "syscon-pol")) {
dispc.syscon_pol = syscon_regmap_lookup_by_phandle_args(np, "syscon-pol",
1, &dispc.syscon_pol_offset);
if (IS_ERR(dispc.syscon_pol)) {
dev_err(&pdev->dev, "failed to get syscon-pol regmap\n");
return PTR_ERR(dispc.syscon_pol);
}

if (of_property_read_u32_index(np, "syscon-pol", 1,
&dispc.syscon_pol_offset)) {
dev_err(&pdev->dev, "failed to get syscon-pol offset\n");
return -EINVAL;
}
}

pm_runtime_enable(&pdev->dev);
Expand Down
1 change: 1 addition & 0 deletions drivers/video/fbdev/omap2/omapfb/dss/dss-of.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ struct device_node *dss_of_port_get_parent_device(struct device_node *port)
np = of_get_next_parent(np);
}

of_node_put(np);
return NULL;
}

Expand Down
17 changes: 0 additions & 17 deletions drivers/video/fbdev/omap2/omapfb/dss/hdmi5_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,23 +567,6 @@ static void hdmi_core_enable_interrupts(struct hdmi_core_data *core)
REG_FLD_MOD(core->base, HDMI_CORE_IH_MUTE, 0x0, 1, 0);
}

int hdmi5_core_handle_irqs(struct hdmi_core_data *core)
{
void __iomem *base = core->base;

REG_FLD_MOD(base, HDMI_CORE_IH_FC_STAT0, 0xff, 7, 0);
REG_FLD_MOD(base, HDMI_CORE_IH_FC_STAT1, 0xff, 7, 0);
REG_FLD_MOD(base, HDMI_CORE_IH_FC_STAT2, 0xff, 7, 0);
REG_FLD_MOD(base, HDMI_CORE_IH_AS_STAT0, 0xff, 7, 0);
REG_FLD_MOD(base, HDMI_CORE_IH_PHY_STAT0, 0xff, 7, 0);
REG_FLD_MOD(base, HDMI_CORE_IH_I2CM_STAT0, 0xff, 7, 0);
REG_FLD_MOD(base, HDMI_CORE_IH_CEC_STAT0, 0xff, 7, 0);
REG_FLD_MOD(base, HDMI_CORE_IH_VP_STAT0, 0xff, 7, 0);
REG_FLD_MOD(base, HDMI_CORE_IH_I2CMPHY_STAT0, 0xff, 7, 0);

return 0;
}

void hdmi5_configure(struct hdmi_core_data *core, struct hdmi_wp_data *wp,
struct hdmi_config *cfg)
{
Expand Down
1 change: 0 additions & 1 deletion drivers/video/fbdev/omap2/omapfb/dss/hdmi5_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ struct csc_table {

int hdmi5_read_edid(struct hdmi_core_data *core, u8 *edid, int len);
void hdmi5_core_dump(struct hdmi_core_data *core, struct seq_file *s);
int hdmi5_core_handle_irqs(struct hdmi_core_data *core);
void hdmi5_configure(struct hdmi_core_data *core, struct hdmi_wp_data *wp,
struct hdmi_config *cfg);
int hdmi5_core_init(struct platform_device *pdev, struct hdmi_core_data *core);
Expand Down
6 changes: 1 addition & 5 deletions drivers/video/fbdev/sh_mobile_lcdcfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2123,11 +2123,7 @@ sh_mobile_lcdc_channel_fb_init(struct sh_mobile_lcdc_chan *ch,
static int sh_mobile_lcdc_update_bl(struct backlight_device *bdev)
{
struct sh_mobile_lcdc_chan *ch = bl_get_data(bdev);
int brightness = bdev->props.brightness;

if (bdev->props.power != BACKLIGHT_POWER_ON ||
bdev->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK))
brightness = 0;
int brightness = backlight_get_brightness(bdev);

ch->bl_brightness = brightness;
return ch->cfg->bl_info.set_brightness(brightness);
Expand Down
5 changes: 3 additions & 2 deletions drivers/video/fbdev/sm501fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <linux/clk.h>
#include <linux/console.h>
#include <linux/io.h>
#include <linux/string_choices.h>

#include <linux/uaccess.h>
#include <asm/div64.h>
Expand Down Expand Up @@ -1712,8 +1713,8 @@ static int sm501fb_init_fb(struct fb_info *fb, enum sm501_controller head,
BUG();
}

dev_info(info->dev, "fb %s %sabled at start\n",
fbname, enable ? "en" : "dis");
dev_info(info->dev, "fb %s %s at start\n",
fbname, str_enabled_disabled(enable));

/* check to see if our routing allows this */

Expand Down
8 changes: 4 additions & 4 deletions drivers/video/fbdev/udlfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1416,7 +1416,7 @@ static ssize_t metrics_cpu_kcycles_used_show(struct device *fbdev,

static ssize_t edid_show(
struct file *filp,
struct kobject *kobj, struct bin_attribute *a,
struct kobject *kobj, const struct bin_attribute *a,
char *buf, loff_t off, size_t count) {
struct device *fbdev = kobj_to_dev(kobj);
struct fb_info *fb_info = dev_get_drvdata(fbdev);
Expand All @@ -1438,7 +1438,7 @@ static ssize_t edid_show(

static ssize_t edid_store(
struct file *filp,
struct kobject *kobj, struct bin_attribute *a,
struct kobject *kobj, const struct bin_attribute *a,
char *src, loff_t src_off, size_t src_size) {
struct device *fbdev = kobj_to_dev(kobj);
struct fb_info *fb_info = dev_get_drvdata(fbdev);
Expand Down Expand Up @@ -1482,8 +1482,8 @@ static const struct bin_attribute edid_attr = {
.attr.name = "edid",
.attr.mode = 0666,
.size = EDID_LENGTH,
.read = edid_show,
.write = edid_store
.read_new = edid_show,
.write_new = edid_store
};

static const struct device_attribute fb_device_attrs[] = {
Expand Down
7 changes: 4 additions & 3 deletions drivers/video/fbdev/vga16fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,10 @@ static inline void setindex(int index)
/* Check if the video mode is supported by the driver */
static inline int check_mode_supported(const struct screen_info *si)
{
unsigned int type = screen_info_video_type(si);

/* only EGA and VGA in 16 color graphic mode are supported */
if (si->orig_video_isVGA != VIDEO_TYPE_EGAC &&
si->orig_video_isVGA != VIDEO_TYPE_VGAC)
if (type != VIDEO_TYPE_EGAC && type != VIDEO_TYPE_VGAC)
return -ENODEV;

if (si->orig_video_mode != 0x0D && /* 320x200/4 (EGA) */
Expand Down Expand Up @@ -1338,7 +1339,7 @@ static int vga16fb_probe(struct platform_device *dev)
printk(KERN_INFO "vga16fb: mapped to 0x%p\n", info->screen_base);
par = info->par;

par->isVGA = si->orig_video_isVGA == VIDEO_TYPE_VGAC;
par->isVGA = screen_info_video_type(si) == VIDEO_TYPE_VGAC;
par->palette_blanked = 0;
par->vesa_blanked = 0;

Expand Down
28 changes: 0 additions & 28 deletions drivers/video/hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -894,34 +894,6 @@ hdmi_vendor_any_infoframe_pack(union hdmi_vendor_any_infoframe *frame,
return hdmi_vendor_any_infoframe_pack_only(frame, buffer, size);
}

/**
* hdmi_infoframe_check() - check a HDMI infoframe
* @frame: HDMI infoframe
*
* Validates that the infoframe is consistent and updates derived fields
* (eg. length) based on other fields.
*
* Returns 0 on success or a negative error code on failure.
*/
int
hdmi_infoframe_check(union hdmi_infoframe *frame)
{
switch (frame->any.type) {
case HDMI_INFOFRAME_TYPE_AVI:
return hdmi_avi_infoframe_check(&frame->avi);
case HDMI_INFOFRAME_TYPE_SPD:
return hdmi_spd_infoframe_check(&frame->spd);
case HDMI_INFOFRAME_TYPE_AUDIO:
return hdmi_audio_infoframe_check(&frame->audio);
case HDMI_INFOFRAME_TYPE_VENDOR:
return hdmi_vendor_any_infoframe_check(&frame->vendor);
default:
WARN(1, "Bad infoframe type %d\n", frame->any.type);
return -EINVAL;
}
}
EXPORT_SYMBOL(hdmi_infoframe_check);

/**
* hdmi_infoframe_pack_only() - write a HDMI infoframe to binary buffer
* @frame: HDMI infoframe
Expand Down
1 change: 0 additions & 1 deletion include/linux/hdmi.h
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,6 @@ ssize_t hdmi_infoframe_pack(union hdmi_infoframe *frame, void *buffer,
size_t size);
ssize_t hdmi_infoframe_pack_only(const union hdmi_infoframe *frame,
void *buffer, size_t size);
int hdmi_infoframe_check(union hdmi_infoframe *frame);
int hdmi_infoframe_unpack(union hdmi_infoframe *frame,
const void *buffer, size_t size);
void hdmi_infoframe_log(const char *level, struct device *dev,
Expand Down

0 comments on commit ac0761d

Please sign in to comment.