Merge tag 'fbdev-v4.16' of git://github.com/bzolnier/linux
Pull fbdev updates from Bartlomiej Zolnierkiewicz: "There is nothing really major here: - fix display-timings lookup in the Device Tree in atmel_lcdfb driver (Johan Hovold) - fix video mode and line_length to be set correctly in vfb driver (Pieter "PoroCYon" Sluys) - fix returning nonsensical values to the user-space on GIO_FONTX ioctl when using dummy console (Nicolas Pitre) - add missing license tag to mmpfb driver (Arnd Bergmann) - convert radeonfb and pxa3xx_gcu drivers to use ktime_get[_ts64]() instead of the deprecated do_gettimeofday() (Arnd Bergmann) - switch udlfb driver from using the pr_*() logging functions to the dev_*() ones + related cleanups (Ladislav Michl) - use __raw I/O accessors also on arm64 (Ji Zhang) - fix Kconfig help text for intelfb driver (Randy Dunlap) - do not duplicate features data in omapfb driver (Ladislav Michl) - misc cleanups (Colin Ian King, Markus Elfring, Rasmus Villemoes, Vasyl Gomonovych, Himanshu Jha, Michael Trimarchi)" * tag 'fbdev-v4.16' of git://github.com/bzolnier/linux: (25 commits) video: udlfb: Switch from the pr_*() to the dev_*() logging functions video: udlfb: Constify read only data video: fbdev/mmp: add MODULE_LICENSE console/dummy: leave .con_font_get set to NULL fbdev: mxsfb: use framebuffer_alloc in the correct way video: udlfb: Do not name private data 'dev' video: udlfb: Remove noisy warnings video: udlfb: Remove redundant gdev variable video: udlfb: Remove unnecessary local variable fbdev: auo_k190x: Use zeroing memory allocator instead of allocator/memset vfb: fix video mode and line_length being set when loaded fbdev: arm64 use __raw I/O memory api omapfb: dss: Do not duplicate features data video: fbdev: omap2: Use PTR_ERR_OR_ZERO() fbdev: au1200fb: delete duplicate header contents fbdev: pxa3xx: use ktime_get_ts64 for time stamps fbdev: radeon: use ktime_get() for HZ calibration video: smscufx: Improve a size determination in two functions video: udlfb: Delete an unnecessary return statement in two functions video: udlfb: Improve a size determination in dlfb_alloc_urb_list() ...
Esse commit está contido em:
@@ -3976,52 +3976,33 @@ static const struct dispc_features omap54xx_dispc_feats = {
|
||||
.has_writeback = true,
|
||||
};
|
||||
|
||||
static int dispc_init_features(struct platform_device *pdev)
|
||||
static const struct dispc_features *dispc_get_features(void)
|
||||
{
|
||||
const struct dispc_features *src;
|
||||
struct dispc_features *dst;
|
||||
|
||||
dst = devm_kzalloc(&pdev->dev, sizeof(*dst), GFP_KERNEL);
|
||||
if (!dst) {
|
||||
dev_err(&pdev->dev, "Failed to allocate DISPC Features\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
switch (omapdss_get_version()) {
|
||||
case OMAPDSS_VER_OMAP24xx:
|
||||
src = &omap24xx_dispc_feats;
|
||||
break;
|
||||
return &omap24xx_dispc_feats;
|
||||
|
||||
case OMAPDSS_VER_OMAP34xx_ES1:
|
||||
src = &omap34xx_rev1_0_dispc_feats;
|
||||
break;
|
||||
return &omap34xx_rev1_0_dispc_feats;
|
||||
|
||||
case OMAPDSS_VER_OMAP34xx_ES3:
|
||||
case OMAPDSS_VER_OMAP3630:
|
||||
case OMAPDSS_VER_AM35xx:
|
||||
case OMAPDSS_VER_AM43xx:
|
||||
src = &omap34xx_rev3_0_dispc_feats;
|
||||
break;
|
||||
return &omap34xx_rev3_0_dispc_feats;
|
||||
|
||||
case OMAPDSS_VER_OMAP4430_ES1:
|
||||
case OMAPDSS_VER_OMAP4430_ES2:
|
||||
case OMAPDSS_VER_OMAP4:
|
||||
src = &omap44xx_dispc_feats;
|
||||
break;
|
||||
return &omap44xx_dispc_feats;
|
||||
|
||||
case OMAPDSS_VER_OMAP5:
|
||||
case OMAPDSS_VER_DRA7xx:
|
||||
src = &omap54xx_dispc_feats;
|
||||
break;
|
||||
return &omap54xx_dispc_feats;
|
||||
|
||||
default:
|
||||
return -ENODEV;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memcpy(dst, src, sizeof(*dst));
|
||||
dispc.feat = dst;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static irqreturn_t dispc_irq_handler(int irq, void *arg)
|
||||
@@ -4078,9 +4059,9 @@ static int dispc_bind(struct device *dev, struct device *master, void *data)
|
||||
|
||||
spin_lock_init(&dispc.control_lock);
|
||||
|
||||
r = dispc_init_features(dispc.pdev);
|
||||
if (r)
|
||||
return r;
|
||||
dispc.feat = dispc_get_features();
|
||||
if (!dispc.feat)
|
||||
return -ENODEV;
|
||||
|
||||
dispc_mem = platform_get_resource(dispc.pdev, IORESOURCE_MEM, 0);
|
||||
if (!dispc_mem) {
|
||||
|
@@ -887,58 +887,37 @@ static const struct dss_features dra7xx_dss_feats = {
|
||||
.num_ports = ARRAY_SIZE(dra7xx_ports),
|
||||
};
|
||||
|
||||
static int dss_init_features(struct platform_device *pdev)
|
||||
static const struct dss_features *dss_get_features(void)
|
||||
{
|
||||
const struct dss_features *src;
|
||||
struct dss_features *dst;
|
||||
|
||||
dst = devm_kzalloc(&pdev->dev, sizeof(*dst), GFP_KERNEL);
|
||||
if (!dst) {
|
||||
dev_err(&pdev->dev, "Failed to allocate local DSS Features\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
switch (omapdss_get_version()) {
|
||||
case OMAPDSS_VER_OMAP24xx:
|
||||
src = &omap24xx_dss_feats;
|
||||
break;
|
||||
return &omap24xx_dss_feats;
|
||||
|
||||
case OMAPDSS_VER_OMAP34xx_ES1:
|
||||
case OMAPDSS_VER_OMAP34xx_ES3:
|
||||
case OMAPDSS_VER_AM35xx:
|
||||
src = &omap34xx_dss_feats;
|
||||
break;
|
||||
return &omap34xx_dss_feats;
|
||||
|
||||
case OMAPDSS_VER_OMAP3630:
|
||||
src = &omap3630_dss_feats;
|
||||
break;
|
||||
return &omap3630_dss_feats;
|
||||
|
||||
case OMAPDSS_VER_OMAP4430_ES1:
|
||||
case OMAPDSS_VER_OMAP4430_ES2:
|
||||
case OMAPDSS_VER_OMAP4:
|
||||
src = &omap44xx_dss_feats;
|
||||
break;
|
||||
return &omap44xx_dss_feats;
|
||||
|
||||
case OMAPDSS_VER_OMAP5:
|
||||
src = &omap54xx_dss_feats;
|
||||
break;
|
||||
return &omap54xx_dss_feats;
|
||||
|
||||
case OMAPDSS_VER_AM43xx:
|
||||
src = &am43xx_dss_feats;
|
||||
break;
|
||||
return &am43xx_dss_feats;
|
||||
|
||||
case OMAPDSS_VER_DRA7xx:
|
||||
src = &dra7xx_dss_feats;
|
||||
break;
|
||||
return &dra7xx_dss_feats;
|
||||
|
||||
default:
|
||||
return -ENODEV;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memcpy(dst, src, sizeof(*dst));
|
||||
dss.feat = dst;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void dss_uninit_ports(struct platform_device *pdev);
|
||||
@@ -1104,9 +1083,9 @@ static int dss_bind(struct device *dev)
|
||||
|
||||
dss.pdev = pdev;
|
||||
|
||||
r = dss_init_features(dss.pdev);
|
||||
if (r)
|
||||
return r;
|
||||
dss.feat = dss_get_features();
|
||||
if (!dss.feat)
|
||||
return -ENODEV;
|
||||
|
||||
dss_mem = platform_get_resource(dss.pdev, IORESOURCE_MEM, 0);
|
||||
if (!dss_mem) {
|
||||
|
@@ -673,10 +673,7 @@ static int hdmi_audio_register(struct device *dev)
|
||||
dev, "omap-hdmi-audio", PLATFORM_DEVID_AUTO,
|
||||
&pdata, sizeof(pdata));
|
||||
|
||||
if (IS_ERR(hdmi.audio_pdev))
|
||||
return PTR_ERR(hdmi.audio_pdev);
|
||||
|
||||
return 0;
|
||||
return PTR_ERR_OR_ZERO(hdmi.audio_pdev);
|
||||
}
|
||||
|
||||
/* HDMI HW IP initialisation */
|
||||
|
@@ -189,47 +189,30 @@ static const struct hdmi_phy_features omap54xx_phy_feats = {
|
||||
.max_phy = 186000000,
|
||||
};
|
||||
|
||||
static int hdmi_phy_init_features(struct platform_device *pdev)
|
||||
static const struct hdmi_phy_features *hdmi_phy_get_features(void)
|
||||
{
|
||||
struct hdmi_phy_features *dst;
|
||||
const struct hdmi_phy_features *src;
|
||||
|
||||
dst = devm_kzalloc(&pdev->dev, sizeof(*dst), GFP_KERNEL);
|
||||
if (!dst) {
|
||||
dev_err(&pdev->dev, "Failed to allocate HDMI PHY Features\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
switch (omapdss_get_version()) {
|
||||
case OMAPDSS_VER_OMAP4430_ES1:
|
||||
case OMAPDSS_VER_OMAP4430_ES2:
|
||||
case OMAPDSS_VER_OMAP4:
|
||||
src = &omap44xx_phy_feats;
|
||||
break;
|
||||
return &omap44xx_phy_feats;
|
||||
|
||||
case OMAPDSS_VER_OMAP5:
|
||||
case OMAPDSS_VER_DRA7xx:
|
||||
src = &omap54xx_phy_feats;
|
||||
break;
|
||||
return &omap54xx_phy_feats;
|
||||
|
||||
default:
|
||||
return -ENODEV;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memcpy(dst, src, sizeof(*dst));
|
||||
phy_feat = dst;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int hdmi_phy_init(struct platform_device *pdev, struct hdmi_phy_data *phy)
|
||||
{
|
||||
int r;
|
||||
struct resource *res;
|
||||
|
||||
r = hdmi_phy_init_features(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
phy_feat = hdmi_phy_get_features();
|
||||
if (!phy_feat)
|
||||
return -ENODEV;
|
||||
|
||||
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "phy");
|
||||
if (!res) {
|
||||
|
Referência em uma nova issue
Block a user