drm-misc-next for v6.6:
UAPI Changes: Cross-subsystem Changes: * dma-buf: * Documentation fixes * fbdev: * Make FB core selectable without drivers * Remove obsolete flags FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT from all drivers and <linux/fb.h> * Add helper macros and Kconfig tokens for DMA-allocated framebuffers * Cleanups Core Changes: * Respect given gfp flags in drmm_kmalloc() Driver Changes: * ast: * Cleanups * bridge: * anx7625: Locking fixes * tc358767: Fix hardware delays * Minor fixes and cleanups * exynos: * Use fbdev DMA helpers * komeda: * Always attach encoder * omapdrm: * Use fbdev DMA helpers * panel: * ld9040: Fix Kconfig dependency * Minor cleanups * ssd130x: * Fix allocation of temporary buffers * Fix pitch computation * tegra: * Use fbdev DMA helpers -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEchf7rIzpz2NEoWjlaA3BHVMLeiMFAmTCZm4ACgkQaA3BHVML eiPOJgf/b52EsvCRq6imZsyDKXDe18d8PGsbF39CqzJv5XmfQqd3AjcDA8GUw/EA 81H6ky/YBJcqvMMPxTNrGDkWrIFWBtCyCcb5qb2MFHR4Dcm35d75oabmrByDEPIH 3T31zwsMEAskEN6q3nNb2CQ/4cQNpv51kcCg7fy+HTf0ApvvW1b4wQZ1KGOh7hTH HnYIBqedt8NqAmzOBIhE079Yi1cHjcj54aM4KheD7hMY3ZK8IajYW3njXqDrzlHT CPqqbEhAEthjiQJc5rjCjDnMLl56IfOGoyWBoRQ0bsGxOtrZehxSdtLwqJU0RVLG LRV+5IinsVLEtzzbeZ03EOdOQq6m1g== =yP8Z -----END PGP SIGNATURE----- Merge tag 'drm-misc-next-2023-07-27' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v6.6: UAPI Changes: Cross-subsystem Changes: * dma-buf: * Documentation fixes * fbdev: * Make FB core selectable without drivers * Remove obsolete flags FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT from all drivers and <linux/fb.h> * Add helper macros and Kconfig tokens for DMA-allocated framebuffers * Cleanups Core Changes: * Respect given gfp flags in drmm_kmalloc() Driver Changes: * ast: * Cleanups * bridge: * anx7625: Locking fixes * tc358767: Fix hardware delays * Minor fixes and cleanups * exynos: * Use fbdev DMA helpers * komeda: * Always attach encoder * omapdrm: * Use fbdev DMA helpers * panel: * ld9040: Fix Kconfig dependency * Minor cleanups * ssd130x: * Fix allocation of temporary buffers * Fix pitch computation * tegra: * Use fbdev DMA helpers Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> From: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20230727124444.GA5547@linux-uq9g
This commit is contained in:
commit
52920704df
@ -119,7 +119,7 @@ static struct fb_videomode sh7763fb_videomode = {
|
||||
.vsync_len = 1,
|
||||
.sync = 0,
|
||||
.vmode = FB_VMODE_NONINTERLACED,
|
||||
.flag = FBINFO_FLAG_DEFAULT,
|
||||
.flag = FB_MODE_IS_UNKNOWN,
|
||||
};
|
||||
|
||||
static struct sh7760fb_platdata sh7763fb_def_pdata = {
|
||||
|
@ -259,7 +259,7 @@ drivers-$(CONFIG_PCI) += arch/x86/pci/
|
||||
# suspend and hibernation support
|
||||
drivers-$(CONFIG_PM) += arch/x86/power/
|
||||
|
||||
drivers-$(CONFIG_FB) += arch/x86/video/
|
||||
drivers-$(CONFIG_FB_CORE) += arch/x86/video/
|
||||
|
||||
####
|
||||
# boot loader support. Several targets are kept for legacy purposes
|
||||
|
@ -1,2 +1,2 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
obj-$(CONFIG_FB) += fbdev.o
|
||||
obj-$(CONFIG_FB_CORE) += fbdev.o
|
||||
|
@ -129,8 +129,6 @@ source "drivers/dma-buf/Kconfig"
|
||||
|
||||
source "drivers/dca/Kconfig"
|
||||
|
||||
source "drivers/auxdisplay/Kconfig"
|
||||
|
||||
source "drivers/uio/Kconfig"
|
||||
|
||||
source "drivers/vfio/Kconfig"
|
||||
|
@ -79,7 +79,6 @@ static int cfag12864bfb_probe(struct platform_device *device)
|
||||
info->var = cfag12864bfb_var;
|
||||
info->pseudo_palette = NULL;
|
||||
info->par = NULL;
|
||||
info->flags = FBINFO_FLAG_DEFAULT;
|
||||
|
||||
if (register_framebuffer(info) < 0)
|
||||
goto fballoced;
|
||||
|
@ -646,7 +646,6 @@ static int ht16k33_fbdev_probe(struct device *dev, struct ht16k33_priv *priv,
|
||||
fbdev->info->var = ht16k33_fb_var;
|
||||
fbdev->info->bl_dev = bl;
|
||||
fbdev->info->pseudo_palette = NULL;
|
||||
fbdev->info->flags = FBINFO_FLAG_DEFAULT;
|
||||
fbdev->info->par = priv;
|
||||
|
||||
err = register_framebuffer(fbdev->info);
|
||||
|
@ -33,7 +33,7 @@
|
||||
* into their address space. This necessitated the creation of the DMA-BUF sysfs
|
||||
* statistics interface to provide per-buffer information on production systems.
|
||||
*
|
||||
* The interface at ``/sys/kernel/dma-buf/buffers`` exposes information about
|
||||
* The interface at ``/sys/kernel/dmabuf/buffers`` exposes information about
|
||||
* every DMA-BUF when ``CONFIG_DMABUF_SYSFS_STATS`` is enabled.
|
||||
*
|
||||
* The following stats are exposed by the interface:
|
||||
|
@ -9,6 +9,9 @@ menuconfig DRM
|
||||
tristate "Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)"
|
||||
depends on (AGP || AGP=n) && !EMULATED_CMPXCHG && HAS_DMA
|
||||
select DRM_PANEL_ORIENTATION_QUIRKS
|
||||
select DRM_KMS_HELPER if DRM_FBDEV_EMULATION
|
||||
select FB_CORE if DRM_FBDEV_EMULATION
|
||||
select FB_SYS_HELPERS_DEFERRED if DRM_FBDEV_EMULATION
|
||||
select HDMI
|
||||
select I2C
|
||||
select DMA_SHARED_BUFFER
|
||||
@ -96,7 +99,6 @@ config DRM_KUNIT_TEST
|
||||
config DRM_KMS_HELPER
|
||||
tristate
|
||||
depends on DRM
|
||||
select FB_SYS_HELPERS_DEFERRED if DRM_FBDEV_EMULATION
|
||||
help
|
||||
CRTC helpers for KMS drivers.
|
||||
|
||||
@ -132,8 +134,7 @@ config DRM_DEBUG_MODESET_LOCK
|
||||
|
||||
config DRM_FBDEV_EMULATION
|
||||
bool "Enable legacy fbdev support for your modesetting driver"
|
||||
depends on DRM_KMS_HELPER
|
||||
depends on FB=y || FB=DRM_KMS_HELPER
|
||||
depends on DRM
|
||||
select FRAMEBUFFER_CONSOLE if !EXPERT
|
||||
select FRAMEBUFFER_CONSOLE_DETECT_PRIMARY if FRAMEBUFFER_CONSOLE
|
||||
default y
|
||||
@ -223,7 +224,7 @@ config DRM_TTM_HELPER
|
||||
config DRM_GEM_DMA_HELPER
|
||||
tristate
|
||||
depends on DRM
|
||||
select FB_SYS_HELPERS if DRM_FBDEV_EMULATION
|
||||
select FB_DMA_HELPERS if DRM_FBDEV_EMULATION
|
||||
help
|
||||
Choose this if you need the GEM DMA helper functions
|
||||
|
||||
|
@ -12,6 +12,8 @@
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_print.h>
|
||||
#include <drm/drm_vblank.h>
|
||||
#include <drm/drm_simple_kms_helper.h>
|
||||
#include <drm/drm_bridge.h>
|
||||
|
||||
#include "komeda_dev.h"
|
||||
#include "komeda_kms.h"
|
||||
@ -612,9 +614,11 @@ static int komeda_crtc_add(struct komeda_kms_dev *kms,
|
||||
struct komeda_crtc *kcrtc)
|
||||
{
|
||||
struct drm_crtc *crtc = &kcrtc->base;
|
||||
struct drm_device *base = &kms->base;
|
||||
struct drm_bridge *bridge;
|
||||
int err;
|
||||
|
||||
err = drm_crtc_init_with_planes(&kms->base, crtc,
|
||||
err = drm_crtc_init_with_planes(base, crtc,
|
||||
get_crtc_primary(kms, kcrtc), NULL,
|
||||
&komeda_crtc_funcs, NULL);
|
||||
if (err)
|
||||
@ -624,6 +628,22 @@ static int komeda_crtc_add(struct komeda_kms_dev *kms,
|
||||
|
||||
crtc->port = kcrtc->master->of_output_port;
|
||||
|
||||
/* Construct an encoder for each pipeline and attach it to the remote
|
||||
* bridge
|
||||
*/
|
||||
kcrtc->encoder.possible_crtcs = drm_crtc_mask(crtc);
|
||||
err = drm_simple_encoder_init(base, &kcrtc->encoder,
|
||||
DRM_MODE_ENCODER_TMDS);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
bridge = devm_drm_of_get_bridge(base->dev, kcrtc->master->of_node,
|
||||
KOMEDA_OF_PORT_OUTPUT, 0);
|
||||
if (IS_ERR(bridge))
|
||||
return PTR_ERR(bridge);
|
||||
|
||||
err = drm_bridge_attach(&kcrtc->encoder, bridge, NULL, 0);
|
||||
|
||||
drm_crtc_enable_color_mgmt(crtc, 0, true, KOMEDA_COLOR_LUT_SIZE);
|
||||
|
||||
return err;
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/component.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <drm/drm_fbdev_generic.h>
|
||||
#include <drm/drm_module.h>
|
||||
@ -28,13 +27,11 @@ struct komeda_dev *dev_to_mdev(struct device *dev)
|
||||
return mdrv ? mdrv->mdev : NULL;
|
||||
}
|
||||
|
||||
static void komeda_unbind(struct device *dev)
|
||||
static void komeda_platform_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
struct komeda_drv *mdrv = dev_get_drvdata(dev);
|
||||
|
||||
if (!mdrv)
|
||||
return;
|
||||
|
||||
komeda_kms_detach(mdrv->kms);
|
||||
|
||||
if (pm_runtime_enabled(dev))
|
||||
@ -48,8 +45,9 @@ static void komeda_unbind(struct device *dev)
|
||||
devm_kfree(dev, mdrv);
|
||||
}
|
||||
|
||||
static int komeda_bind(struct device *dev)
|
||||
static int komeda_platform_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
struct komeda_drv *mdrv;
|
||||
int err;
|
||||
|
||||
@ -91,51 +89,6 @@ free_mdrv:
|
||||
return err;
|
||||
}
|
||||
|
||||
static const struct component_master_ops komeda_master_ops = {
|
||||
.bind = komeda_bind,
|
||||
.unbind = komeda_unbind,
|
||||
};
|
||||
|
||||
static void komeda_add_slave(struct device *master,
|
||||
struct component_match **match,
|
||||
struct device_node *np,
|
||||
u32 port, u32 endpoint)
|
||||
{
|
||||
struct device_node *remote;
|
||||
|
||||
remote = of_graph_get_remote_node(np, port, endpoint);
|
||||
if (remote) {
|
||||
drm_of_component_match_add(master, match, component_compare_of, remote);
|
||||
of_node_put(remote);
|
||||
}
|
||||
}
|
||||
|
||||
static int komeda_platform_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
struct component_match *match = NULL;
|
||||
struct device_node *child;
|
||||
|
||||
if (!dev->of_node)
|
||||
return -ENODEV;
|
||||
|
||||
for_each_available_child_of_node(dev->of_node, child) {
|
||||
if (of_node_cmp(child->name, "pipeline") != 0)
|
||||
continue;
|
||||
|
||||
/* add connector */
|
||||
komeda_add_slave(dev, &match, child, KOMEDA_OF_PORT_OUTPUT, 0);
|
||||
komeda_add_slave(dev, &match, child, KOMEDA_OF_PORT_OUTPUT, 1);
|
||||
}
|
||||
|
||||
return component_master_add_with_match(dev, &komeda_master_ops, match);
|
||||
}
|
||||
|
||||
static void komeda_platform_remove(struct platform_device *pdev)
|
||||
{
|
||||
component_master_del(&pdev->dev, &komeda_master_ops);
|
||||
}
|
||||
|
||||
static const struct of_device_id komeda_of_match[] = {
|
||||
{ .compatible = "arm,mali-d71", .data = d71_identify, },
|
||||
{ .compatible = "arm,mali-d32", .data = d71_identify, },
|
||||
|
@ -4,7 +4,6 @@
|
||||
* Author: James.Qian.Wang <james.qian.wang@arm.com>
|
||||
*
|
||||
*/
|
||||
#include <linux/component.h>
|
||||
#include <linux/interrupt.h>
|
||||
|
||||
#include <drm/drm_atomic.h>
|
||||
@ -305,17 +304,13 @@ struct komeda_kms_dev *komeda_kms_attach(struct komeda_dev *mdev)
|
||||
if (err)
|
||||
goto cleanup_mode_config;
|
||||
|
||||
err = component_bind_all(mdev->dev, kms);
|
||||
if (err)
|
||||
goto cleanup_mode_config;
|
||||
|
||||
drm_mode_config_reset(drm);
|
||||
|
||||
err = devm_request_irq(drm->dev, mdev->irq,
|
||||
komeda_kms_irq_handler, IRQF_SHARED,
|
||||
drm->driver->name, drm);
|
||||
if (err)
|
||||
goto free_component_binding;
|
||||
goto cleanup_mode_config;
|
||||
|
||||
drm_kms_helper_poll_init(drm);
|
||||
|
||||
@ -327,8 +322,6 @@ struct komeda_kms_dev *komeda_kms_attach(struct komeda_dev *mdev)
|
||||
|
||||
free_interrupts:
|
||||
drm_kms_helper_poll_fini(drm);
|
||||
free_component_binding:
|
||||
component_unbind_all(mdev->dev, drm);
|
||||
cleanup_mode_config:
|
||||
drm_mode_config_cleanup(drm);
|
||||
komeda_kms_cleanup_private_objs(kms);
|
||||
@ -339,12 +332,10 @@ cleanup_mode_config:
|
||||
void komeda_kms_detach(struct komeda_kms_dev *kms)
|
||||
{
|
||||
struct drm_device *drm = &kms->base;
|
||||
struct komeda_dev *mdev = drm->dev_private;
|
||||
|
||||
drm_dev_unregister(drm);
|
||||
drm_kms_helper_poll_fini(drm);
|
||||
drm_atomic_helper_shutdown(drm);
|
||||
component_unbind_all(mdev->dev, drm);
|
||||
drm_mode_config_cleanup(drm);
|
||||
komeda_kms_cleanup_private_objs(kms);
|
||||
drm->dev_private = NULL;
|
||||
|
@ -84,6 +84,9 @@ struct komeda_crtc {
|
||||
|
||||
/** @disable_done: this flip_done is for tracing the disable */
|
||||
struct completion *disable_done;
|
||||
|
||||
/** @encoder: encoder at the end of the pipeline */
|
||||
struct drm_encoder encoder;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -35,23 +35,6 @@
|
||||
|
||||
#include "ast_drv.h"
|
||||
|
||||
static int ast_init_pci_config(struct pci_dev *pdev)
|
||||
{
|
||||
int err;
|
||||
u16 pcis04;
|
||||
|
||||
err = pci_read_config_word(pdev, PCI_COMMAND, &pcis04);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
pcis04 |= PCI_COMMAND_MEMORY | PCI_COMMAND_IO;
|
||||
|
||||
err = pci_write_config_word(pdev, PCI_COMMAND, pcis04);
|
||||
|
||||
out:
|
||||
return pcibios_err_to_errno(err);
|
||||
}
|
||||
|
||||
static bool ast_is_vga_enabled(struct drm_device *dev)
|
||||
{
|
||||
struct ast_device *ast = to_ast_device(dev);
|
||||
@ -483,10 +466,6 @@ struct ast_device *ast_device_create(const struct drm_driver *drv,
|
||||
return ERR_PTR(-EIO);
|
||||
}
|
||||
|
||||
ret = ast_init_pci_config(pdev);
|
||||
if (ret)
|
||||
return ERR_PTR(ret);
|
||||
|
||||
if (!ast_is_vga_enabled(dev)) {
|
||||
drm_info(dev, "VGA not enabled on entry, requesting chip POST\n");
|
||||
need_post = true;
|
||||
|
@ -74,19 +74,19 @@ config DRM_FSL_LDB
|
||||
Support for i.MX8MP DPI-to-LVDS on-SoC encoder.
|
||||
|
||||
config DRM_ITE_IT6505
|
||||
tristate "ITE IT6505 DisplayPort bridge"
|
||||
depends on OF
|
||||
tristate "ITE IT6505 DisplayPort bridge"
|
||||
depends on OF
|
||||
select DRM_DISPLAY_DP_HELPER
|
||||
select DRM_DISPLAY_HDCP_HELPER
|
||||
select DRM_DISPLAY_HELPER
|
||||
select DRM_DP_AUX_BUS
|
||||
select DRM_KMS_HELPER
|
||||
select DRM_DP_HELPER
|
||||
select EXTCON
|
||||
select CRYPTO
|
||||
select CRYPTO_HASH
|
||||
help
|
||||
ITE IT6505 DisplayPort bridge chip driver.
|
||||
select DRM_DP_AUX_BUS
|
||||
select DRM_KMS_HELPER
|
||||
select DRM_DP_HELPER
|
||||
select EXTCON
|
||||
select CRYPTO
|
||||
select CRYPTO_HASH
|
||||
help
|
||||
ITE IT6505 DisplayPort bridge chip driver.
|
||||
|
||||
config DRM_LONTIUM_LT8912B
|
||||
tristate "Lontium LT8912B DSI/HDMI bridge"
|
||||
|
@ -206,7 +206,7 @@ static int anx7625_read_ctrl_status_p0(struct anx7625_data *ctx)
|
||||
|
||||
static int wait_aux_op_finish(struct anx7625_data *ctx)
|
||||
{
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
int val;
|
||||
int ret;
|
||||
|
||||
@ -233,7 +233,7 @@ static int wait_aux_op_finish(struct anx7625_data *ctx)
|
||||
static int anx7625_aux_trans(struct anx7625_data *ctx, u8 op, u32 address,
|
||||
u8 len, u8 *buf)
|
||||
{
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
int ret;
|
||||
u8 addrh, addrm, addrl;
|
||||
u8 cmd;
|
||||
@ -426,7 +426,7 @@ static int anx7625_odfc_config(struct anx7625_data *ctx,
|
||||
u8 post_divider)
|
||||
{
|
||||
int ret;
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
|
||||
/* Config input reference clock frequency 27MHz/19.2MHz */
|
||||
ret = anx7625_write_and(ctx, ctx->i2c.rx_p1_client, MIPI_DIGITAL_PLL_16,
|
||||
@ -476,7 +476,7 @@ static int anx7625_set_k_value(struct anx7625_data *ctx)
|
||||
|
||||
static int anx7625_dsi_video_timing_config(struct anx7625_data *ctx)
|
||||
{
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
unsigned long m, n;
|
||||
u16 htotal;
|
||||
int ret;
|
||||
@ -574,7 +574,7 @@ static int anx7625_dsi_video_timing_config(struct anx7625_data *ctx)
|
||||
static int anx7625_swap_dsi_lane3(struct anx7625_data *ctx)
|
||||
{
|
||||
int val;
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
|
||||
/* Swap MIPI-DSI data lane 3 P and N */
|
||||
val = anx7625_reg_read(ctx, ctx->i2c.rx_p1_client, MIPI_SWAP);
|
||||
@ -591,7 +591,7 @@ static int anx7625_api_dsi_config(struct anx7625_data *ctx)
|
||||
|
||||
{
|
||||
int val, ret;
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
|
||||
/* Swap MIPI-DSI data lane 3 P and N */
|
||||
ret = anx7625_swap_dsi_lane3(ctx);
|
||||
@ -656,7 +656,7 @@ static int anx7625_api_dsi_config(struct anx7625_data *ctx)
|
||||
|
||||
static int anx7625_dsi_config(struct anx7625_data *ctx)
|
||||
{
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
int ret;
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "config dsi.\n");
|
||||
@ -688,7 +688,7 @@ static int anx7625_dsi_config(struct anx7625_data *ctx)
|
||||
|
||||
static int anx7625_api_dpi_config(struct anx7625_data *ctx)
|
||||
{
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
u16 freq = ctx->dt.pixelclock.min / 1000;
|
||||
int ret;
|
||||
|
||||
@ -719,7 +719,7 @@ static int anx7625_api_dpi_config(struct anx7625_data *ctx)
|
||||
|
||||
static int anx7625_dpi_config(struct anx7625_data *ctx)
|
||||
{
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
int ret;
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "config dpi\n");
|
||||
@ -764,7 +764,7 @@ static int anx7625_read_flash_status(struct anx7625_data *ctx)
|
||||
static int anx7625_hdcp_key_probe(struct anx7625_data *ctx)
|
||||
{
|
||||
int ret, val;
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
u8 ident[FLASH_BUF_LEN];
|
||||
|
||||
ret = anx7625_reg_write(ctx, ctx->i2c.rx_p0_client,
|
||||
@ -814,7 +814,7 @@ static int anx7625_hdcp_key_probe(struct anx7625_data *ctx)
|
||||
static int anx7625_hdcp_key_load(struct anx7625_data *ctx)
|
||||
{
|
||||
int ret;
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
|
||||
/* Select HDCP 1.4 KEY */
|
||||
ret = anx7625_reg_write(ctx, ctx->i2c.rx_p0_client,
|
||||
@ -842,7 +842,7 @@ static int anx7625_hdcp_key_load(struct anx7625_data *ctx)
|
||||
static int anx7625_hdcp_disable(struct anx7625_data *ctx)
|
||||
{
|
||||
int ret;
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
|
||||
dev_dbg(dev, "disable HDCP 1.4\n");
|
||||
|
||||
@ -863,7 +863,7 @@ static int anx7625_hdcp_enable(struct anx7625_data *ctx)
|
||||
{
|
||||
u8 bcap;
|
||||
int ret;
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
|
||||
ret = anx7625_hdcp_key_probe(ctx);
|
||||
if (ret) {
|
||||
@ -921,7 +921,7 @@ static int anx7625_hdcp_enable(struct anx7625_data *ctx)
|
||||
static void anx7625_dp_start(struct anx7625_data *ctx)
|
||||
{
|
||||
int ret;
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
u8 data;
|
||||
|
||||
if (!ctx->display_timing_valid) {
|
||||
@ -954,7 +954,7 @@ static void anx7625_dp_start(struct anx7625_data *ctx)
|
||||
|
||||
static void anx7625_dp_stop(struct anx7625_data *ctx)
|
||||
{
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
int ret;
|
||||
u8 data;
|
||||
|
||||
@ -1019,7 +1019,7 @@ static int sp_tx_aux_rd(struct anx7625_data *ctx, u8 len_cmd)
|
||||
static int sp_tx_get_edid_block(struct anx7625_data *ctx)
|
||||
{
|
||||
int c = 0;
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
|
||||
sp_tx_aux_wr(ctx, 0x7e);
|
||||
sp_tx_aux_rd(ctx, 0x01);
|
||||
@ -1041,7 +1041,7 @@ static int edid_read(struct anx7625_data *ctx,
|
||||
u8 offset, u8 *pblock_buf)
|
||||
{
|
||||
int ret, cnt;
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
|
||||
for (cnt = 0; cnt <= EDID_TRY_CNT; cnt++) {
|
||||
sp_tx_aux_wr(ctx, offset);
|
||||
@ -1072,7 +1072,7 @@ static int segments_edid_read(struct anx7625_data *ctx,
|
||||
{
|
||||
u8 cnt;
|
||||
int ret;
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
|
||||
/* Write address only */
|
||||
ret = anx7625_reg_write(ctx, ctx->i2c.rx_p0_client,
|
||||
@ -1127,7 +1127,7 @@ static int sp_tx_edid_read(struct anx7625_data *ctx,
|
||||
u8 i, j;
|
||||
int g_edid_break = 0;
|
||||
int ret;
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
|
||||
/* Address initial */
|
||||
ret = anx7625_reg_write(ctx, ctx->i2c.rx_p0_client,
|
||||
@ -1234,7 +1234,7 @@ static int sp_tx_edid_read(struct anx7625_data *ctx,
|
||||
|
||||
static void anx7625_power_on(struct anx7625_data *ctx)
|
||||
{
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
int ret, i;
|
||||
|
||||
if (!ctx->pdata.low_power_mode) {
|
||||
@ -1270,7 +1270,7 @@ reg_err:
|
||||
|
||||
static void anx7625_power_standby(struct anx7625_data *ctx)
|
||||
{
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
int ret;
|
||||
|
||||
if (!ctx->pdata.low_power_mode) {
|
||||
@ -1300,7 +1300,7 @@ static void anx7625_config(struct anx7625_data *ctx)
|
||||
|
||||
static void anx7625_disable_pd_protocol(struct anx7625_data *ctx)
|
||||
{
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
int ret;
|
||||
|
||||
/* Reset main ocm */
|
||||
@ -1320,7 +1320,7 @@ static void anx7625_disable_pd_protocol(struct anx7625_data *ctx)
|
||||
static int anx7625_ocm_loading_check(struct anx7625_data *ctx)
|
||||
{
|
||||
int ret;
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
|
||||
/* Check interface workable */
|
||||
ret = anx7625_reg_read(ctx, ctx->i2c.rx_p0_client,
|
||||
@ -1366,7 +1366,7 @@ static void anx7625_power_on_init(struct anx7625_data *ctx)
|
||||
|
||||
static void anx7625_init_gpio(struct anx7625_data *platform)
|
||||
{
|
||||
struct device *dev = &platform->client->dev;
|
||||
struct device *dev = platform->dev;
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "init gpio\n");
|
||||
|
||||
@ -1406,7 +1406,7 @@ static void anx7625_stop_dp_work(struct anx7625_data *ctx)
|
||||
static void anx7625_start_dp_work(struct anx7625_data *ctx)
|
||||
{
|
||||
int ret;
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
|
||||
if (ctx->hpd_high_cnt >= 2) {
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "filter useless HPD\n");
|
||||
@ -1458,7 +1458,7 @@ static int _anx7625_hpd_polling(struct anx7625_data *ctx,
|
||||
unsigned long wait_us)
|
||||
{
|
||||
int ret, val;
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
|
||||
/* Interrupt mode, no need poll HPD status, just return */
|
||||
if (ctx->pdata.intp_irq)
|
||||
@ -1492,7 +1492,7 @@ static int anx7625_wait_hpd_asserted(struct drm_dp_aux *aux,
|
||||
unsigned long wait_us)
|
||||
{
|
||||
struct anx7625_data *ctx = container_of(aux, struct anx7625_data, aux);
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
int ret;
|
||||
|
||||
pm_runtime_get_sync(dev);
|
||||
@ -1525,7 +1525,7 @@ static void anx7625_dp_adjust_swing(struct anx7625_data *ctx)
|
||||
|
||||
static void dp_hpd_change_handler(struct anx7625_data *ctx, bool on)
|
||||
{
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
|
||||
/* HPD changed */
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "dp_hpd_change_default_func: %d\n",
|
||||
@ -1545,7 +1545,7 @@ static void dp_hpd_change_handler(struct anx7625_data *ctx, bool on)
|
||||
static int anx7625_hpd_change_detect(struct anx7625_data *ctx)
|
||||
{
|
||||
int intr_vector, status;
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
|
||||
status = anx7625_reg_write(ctx, ctx->i2c.tcpc_client,
|
||||
INTR_ALERT_1, 0xFF);
|
||||
@ -1593,18 +1593,20 @@ static void anx7625_work_func(struct work_struct *work)
|
||||
|
||||
mutex_lock(&ctx->lock);
|
||||
|
||||
if (pm_runtime_suspended(&ctx->client->dev))
|
||||
goto unlock;
|
||||
if (pm_runtime_suspended(ctx->dev)) {
|
||||
mutex_unlock(&ctx->lock);
|
||||
return;
|
||||
}
|
||||
|
||||
event = anx7625_hpd_change_detect(ctx);
|
||||
|
||||
mutex_unlock(&ctx->lock);
|
||||
|
||||
if (event < 0)
|
||||
goto unlock;
|
||||
return;
|
||||
|
||||
if (ctx->bridge_attached)
|
||||
drm_helper_hpd_irq_event(ctx->bridge.dev);
|
||||
|
||||
unlock:
|
||||
mutex_unlock(&ctx->lock);
|
||||
}
|
||||
|
||||
static irqreturn_t anx7625_intr_hpd_isr(int irq, void *data)
|
||||
@ -1735,7 +1737,7 @@ static ssize_t anx7625_aux_transfer(struct drm_dp_aux *aux,
|
||||
struct drm_dp_aux_msg *msg)
|
||||
{
|
||||
struct anx7625_data *ctx = container_of(aux, struct anx7625_data, aux);
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
u8 request = msg->request & ~DP_AUX_I2C_MOT;
|
||||
int ret = 0;
|
||||
|
||||
@ -1761,7 +1763,7 @@ static ssize_t anx7625_aux_transfer(struct drm_dp_aux *aux,
|
||||
|
||||
static struct edid *anx7625_get_edid(struct anx7625_data *ctx)
|
||||
{
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
struct s_edid_data *p_edid = &ctx->slimport_edid_p;
|
||||
int edid_num;
|
||||
u8 *edid;
|
||||
@ -1797,7 +1799,7 @@ static struct edid *anx7625_get_edid(struct anx7625_data *ctx)
|
||||
|
||||
static enum drm_connector_status anx7625_sink_detect(struct anx7625_data *ctx)
|
||||
{
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "sink detect\n");
|
||||
|
||||
@ -2006,7 +2008,7 @@ static const struct hdmi_codec_ops anx7625_codec_ops = {
|
||||
|
||||
static void anx7625_unregister_audio(struct anx7625_data *ctx)
|
||||
{
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
|
||||
if (ctx->audio_pdev) {
|
||||
platform_device_unregister(ctx->audio_pdev);
|
||||
@ -2042,7 +2044,7 @@ static int anx7625_register_audio(struct device *dev, struct anx7625_data *ctx)
|
||||
static int anx7625_setup_dsi_device(struct anx7625_data *ctx)
|
||||
{
|
||||
struct mipi_dsi_device *dsi;
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
struct mipi_dsi_host *host;
|
||||
const struct mipi_dsi_device_info info = {
|
||||
.type = "anx7625",
|
||||
@ -2076,7 +2078,7 @@ static int anx7625_setup_dsi_device(struct anx7625_data *ctx)
|
||||
|
||||
static int anx7625_attach_dsi(struct anx7625_data *ctx)
|
||||
{
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
int ret;
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "attach dsi\n");
|
||||
@ -2102,7 +2104,7 @@ static void hdcp_check_work_func(struct work_struct *work)
|
||||
|
||||
dwork = to_delayed_work(work);
|
||||
ctx = container_of(dwork, struct anx7625_data, hdcp_work);
|
||||
dev = &ctx->client->dev;
|
||||
dev = ctx->dev;
|
||||
|
||||
if (!ctx->connector) {
|
||||
dev_err(dev, "HDCP connector is null!");
|
||||
@ -2129,7 +2131,7 @@ static void hdcp_check_work_func(struct work_struct *work)
|
||||
static int anx7625_connector_atomic_check(struct anx7625_data *ctx,
|
||||
struct drm_connector_state *state)
|
||||
{
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
int cp;
|
||||
|
||||
dev_dbg(dev, "hdcp state check\n");
|
||||
@ -2174,7 +2176,7 @@ static int anx7625_bridge_attach(struct drm_bridge *bridge,
|
||||
{
|
||||
struct anx7625_data *ctx = bridge_to_anx7625(bridge);
|
||||
int err;
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "drm attach\n");
|
||||
if (!(flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR))
|
||||
@ -2218,7 +2220,7 @@ anx7625_bridge_mode_valid(struct drm_bridge *bridge,
|
||||
const struct drm_display_mode *mode)
|
||||
{
|
||||
struct anx7625_data *ctx = bridge_to_anx7625(bridge);
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "drm mode checking\n");
|
||||
|
||||
@ -2239,7 +2241,7 @@ static void anx7625_bridge_mode_set(struct drm_bridge *bridge,
|
||||
const struct drm_display_mode *mode)
|
||||
{
|
||||
struct anx7625_data *ctx = bridge_to_anx7625(bridge);
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "drm mode set\n");
|
||||
|
||||
@ -2285,7 +2287,7 @@ static bool anx7625_bridge_mode_fixup(struct drm_bridge *bridge,
|
||||
struct drm_display_mode *adj)
|
||||
{
|
||||
struct anx7625_data *ctx = bridge_to_anx7625(bridge);
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
u32 hsync, hfp, hbp, hblanking;
|
||||
u32 adj_hsync, adj_hfp, adj_hbp, adj_hblanking, delta_adj;
|
||||
u32 vref, adj_clock;
|
||||
@ -2403,7 +2405,7 @@ static int anx7625_bridge_atomic_check(struct drm_bridge *bridge,
|
||||
struct drm_connector_state *conn_state)
|
||||
{
|
||||
struct anx7625_data *ctx = bridge_to_anx7625(bridge);
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
|
||||
dev_dbg(dev, "drm bridge atomic check\n");
|
||||
|
||||
@ -2417,7 +2419,7 @@ static void anx7625_bridge_atomic_enable(struct drm_bridge *bridge,
|
||||
struct drm_bridge_state *state)
|
||||
{
|
||||
struct anx7625_data *ctx = bridge_to_anx7625(bridge);
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
struct drm_connector *connector;
|
||||
|
||||
dev_dbg(dev, "drm atomic enable\n");
|
||||
@ -2444,7 +2446,7 @@ static void anx7625_bridge_atomic_disable(struct drm_bridge *bridge,
|
||||
struct drm_bridge_state *old)
|
||||
{
|
||||
struct anx7625_data *ctx = bridge_to_anx7625(bridge);
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
|
||||
dev_dbg(dev, "drm atomic disable\n");
|
||||
|
||||
@ -2458,7 +2460,7 @@ static enum drm_connector_status
|
||||
anx7625_bridge_detect(struct drm_bridge *bridge)
|
||||
{
|
||||
struct anx7625_data *ctx = bridge_to_anx7625(bridge);
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "drm bridge detect\n");
|
||||
|
||||
@ -2469,7 +2471,7 @@ static struct edid *anx7625_bridge_get_edid(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector)
|
||||
{
|
||||
struct anx7625_data *ctx = bridge_to_anx7625(bridge);
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "drm bridge get edid\n");
|
||||
|
||||
@ -2494,7 +2496,7 @@ static const struct drm_bridge_funcs anx7625_bridge_funcs = {
|
||||
static int anx7625_register_i2c_dummy_clients(struct anx7625_data *ctx,
|
||||
struct i2c_client *client)
|
||||
{
|
||||
struct device *dev = &ctx->client->dev;
|
||||
struct device *dev = ctx->dev;
|
||||
|
||||
ctx->i2c.tx_p0_client = devm_i2c_new_dummy_device(dev, client->adapter,
|
||||
TX_P0_ADDR >> 1);
|
||||
@ -2629,7 +2631,7 @@ static int anx7625_i2c_probe(struct i2c_client *client)
|
||||
|
||||
pdata = &platform->pdata;
|
||||
|
||||
platform->client = client;
|
||||
platform->dev = &client->dev;
|
||||
i2c_set_clientdata(client, platform);
|
||||
|
||||
pdata->supplies[0].supply = "vdd10";
|
||||
|
@ -458,7 +458,7 @@ struct anx7625_data {
|
||||
int hdcp_cp;
|
||||
/* Lock for work queue */
|
||||
struct mutex lock;
|
||||
struct i2c_client *client;
|
||||
struct device *dev;
|
||||
struct anx7625_i2c_client i2c;
|
||||
struct i2c_client *last_client;
|
||||
struct timer_list hdcp_timer;
|
||||
|
@ -404,7 +404,7 @@ struct debugfs_entries {
|
||||
struct it6505 {
|
||||
struct drm_dp_aux aux;
|
||||
struct drm_bridge bridge;
|
||||
struct i2c_client *client;
|
||||
struct device *dev;
|
||||
struct it6505_drm_dp_link link;
|
||||
struct it6505_platform_data pdata;
|
||||
/*
|
||||
@ -524,7 +524,7 @@ static int it6505_read(struct it6505 *it6505, unsigned int reg_addr)
|
||||
{
|
||||
unsigned int value;
|
||||
int err;
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
|
||||
if (!it6505->powered)
|
||||
return -ENODEV;
|
||||
@ -542,7 +542,7 @@ static int it6505_write(struct it6505 *it6505, unsigned int reg_addr,
|
||||
unsigned int reg_val)
|
||||
{
|
||||
int err;
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
|
||||
if (!it6505->powered)
|
||||
return -ENODEV;
|
||||
@ -562,7 +562,7 @@ static int it6505_set_bits(struct it6505 *it6505, unsigned int reg,
|
||||
unsigned int mask, unsigned int value)
|
||||
{
|
||||
int err;
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
|
||||
if (!it6505->powered)
|
||||
return -ENODEV;
|
||||
@ -580,7 +580,7 @@ static int it6505_set_bits(struct it6505 *it6505, unsigned int reg,
|
||||
static void it6505_debug_print(struct it6505 *it6505, unsigned int reg,
|
||||
const char *prefix)
|
||||
{
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
int val;
|
||||
|
||||
if (!drm_debug_enabled(DRM_UT_DRIVER))
|
||||
@ -599,7 +599,7 @@ static int it6505_dpcd_read(struct it6505 *it6505, unsigned long offset)
|
||||
{
|
||||
u8 value;
|
||||
int ret;
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
|
||||
ret = drm_dp_dpcd_readb(&it6505->aux, offset, &value);
|
||||
if (ret < 0) {
|
||||
@ -613,7 +613,7 @@ static int it6505_dpcd_write(struct it6505 *it6505, unsigned long offset,
|
||||
u8 datain)
|
||||
{
|
||||
int ret;
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
|
||||
ret = drm_dp_dpcd_writeb(&it6505->aux, offset, datain);
|
||||
if (ret < 0) {
|
||||
@ -626,7 +626,7 @@ static int it6505_dpcd_write(struct it6505 *it6505, unsigned long offset,
|
||||
static int it6505_get_dpcd(struct it6505 *it6505, int offset, u8 *dpcd, int num)
|
||||
{
|
||||
int ret;
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
|
||||
ret = drm_dp_dpcd_read(&it6505->aux, offset, dpcd, num);
|
||||
|
||||
@ -643,7 +643,7 @@ static void it6505_dump(struct it6505 *it6505)
|
||||
{
|
||||
unsigned int i, j;
|
||||
u8 regs[16];
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
|
||||
for (i = 0; i <= 0xff; i += 16) {
|
||||
for (j = 0; j < 16; j++)
|
||||
@ -682,7 +682,7 @@ static int it6505_read_word(struct it6505 *it6505, unsigned int reg)
|
||||
|
||||
static void it6505_calc_video_info(struct it6505 *it6505)
|
||||
{
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
int hsync_pol, vsync_pol, interlaced;
|
||||
int htotal, hdes, hdew, hfph, hsyncw;
|
||||
int vtotal, vdes, vdew, vfph, vsyncw;
|
||||
@ -926,7 +926,7 @@ static int it6505_aux_wait(struct it6505 *it6505)
|
||||
{
|
||||
int status;
|
||||
unsigned long timeout;
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
|
||||
timeout = jiffies + msecs_to_jiffies(AUX_WAIT_TIMEOUT_MS) + 1;
|
||||
|
||||
@ -1141,7 +1141,7 @@ static int it6505_get_edid_block(void *data, u8 *buf, unsigned int block,
|
||||
size_t len)
|
||||
{
|
||||
struct it6505 *it6505 = data;
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
enum aux_cmd_reply reply;
|
||||
int offset, ret, aux_retry = 100;
|
||||
|
||||
@ -1201,7 +1201,7 @@ static int it6505_send_video_infoframe(struct it6505 *it6505,
|
||||
{
|
||||
u8 buffer[HDMI_INFOFRAME_HEADER_SIZE + HDMI_AVI_INFOFRAME_SIZE];
|
||||
int err;
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
|
||||
err = hdmi_avi_infoframe_pack(frame, buffer, sizeof(buffer));
|
||||
if (err < 0) {
|
||||
@ -1231,7 +1231,7 @@ static void it6505_get_extcon_property(struct it6505 *it6505)
|
||||
{
|
||||
int err;
|
||||
union extcon_property_value property;
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
|
||||
if (it6505->extcon && !it6505->lane_swap_disabled) {
|
||||
err = extcon_get_property(it6505->extcon, EXTCON_DISP_DP,
|
||||
@ -1382,7 +1382,7 @@ static void it6505_enable_audio_source(struct it6505 *it6505)
|
||||
|
||||
static void it6505_enable_audio_infoframe(struct it6505 *it6505)
|
||||
{
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
u8 audio_info_ca[] = { 0x00, 0x00, 0x01, 0x03, 0x07, 0x0B, 0x0F, 0x1F };
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "infoframe channel_allocation:0x%02x",
|
||||
@ -1411,7 +1411,7 @@ static void it6505_disable_audio(struct it6505 *it6505)
|
||||
|
||||
static void it6505_enable_audio(struct it6505 *it6505)
|
||||
{
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
int regbe;
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "start");
|
||||
@ -1446,7 +1446,7 @@ static bool it6505_use_step_train_check(struct it6505 *it6505)
|
||||
|
||||
static void it6505_parse_link_capabilities(struct it6505 *it6505)
|
||||
{
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
struct it6505_drm_dp_link *link = &it6505->link;
|
||||
int bcaps;
|
||||
|
||||
@ -1557,7 +1557,7 @@ static void it6505_lane_count_setup(struct it6505 *it6505)
|
||||
|
||||
static void it6505_link_training_setup(struct it6505 *it6505)
|
||||
{
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
|
||||
if (it6505->enable_enhanced_frame)
|
||||
it6505_set_bits(it6505, REG_DATA_MUTE_CTRL,
|
||||
@ -1708,7 +1708,7 @@ it6505_step_cr_train(struct it6505 *it6505,
|
||||
FORCE_CR_DONE);
|
||||
return true;
|
||||
}
|
||||
DRM_DEV_DEBUG_DRIVER(&it6505->client->dev, "cr not done");
|
||||
DRM_DEV_DEBUG_DRIVER(it6505->dev, "cr not done");
|
||||
|
||||
if (it6505_check_max_voltage_swing_reached(lane_level_config,
|
||||
it6505->lane_count))
|
||||
@ -1785,7 +1785,7 @@ it6505_step_eq_train(struct it6505 *it6505,
|
||||
FORCE_EQ_DONE);
|
||||
return true;
|
||||
}
|
||||
DRM_DEV_DEBUG_DRIVER(&it6505->client->dev, "eq not done");
|
||||
DRM_DEV_DEBUG_DRIVER(it6505->dev, "eq not done");
|
||||
|
||||
for (i = 0; i < it6505->lane_count; i++) {
|
||||
lane_voltage_pre_emphasis->voltage_swing[i] =
|
||||
@ -1820,7 +1820,7 @@ static bool it6505_link_start_step_train(struct it6505 *it6505)
|
||||
.pre_emphasis = { 0 },
|
||||
};
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(&it6505->client->dev, "start");
|
||||
DRM_DEV_DEBUG_DRIVER(it6505->dev, "start");
|
||||
err = it6505_drm_dp_link_configure(it6505);
|
||||
|
||||
if (err < 0)
|
||||
@ -1854,7 +1854,7 @@ static void it6505_reset_hdcp(struct it6505 *it6505)
|
||||
|
||||
static void it6505_start_hdcp(struct it6505 *it6505)
|
||||
{
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "start");
|
||||
it6505_reset_hdcp(it6505);
|
||||
@ -1882,7 +1882,7 @@ static bool it6505_hdcp_is_ksv_valid(u8 *ksv)
|
||||
|
||||
static void it6505_hdcp_part1_auth(struct it6505 *it6505)
|
||||
{
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
u8 hdcp_bcaps;
|
||||
|
||||
it6505_set_bits(it6505, REG_RESET_CTRL, HDCP_RESET, 0x00);
|
||||
@ -1923,7 +1923,7 @@ static int it6505_sha1_digest(struct it6505 *it6505, u8 *sha1_input,
|
||||
struct shash_desc *desc;
|
||||
struct crypto_shash *tfm;
|
||||
int err;
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
|
||||
tfm = crypto_alloc_shash("sha1", 0, 0);
|
||||
if (IS_ERR(tfm)) {
|
||||
@ -1948,7 +1948,7 @@ static int it6505_sha1_digest(struct it6505 *it6505, u8 *sha1_input,
|
||||
|
||||
static int it6505_setup_sha1_input(struct it6505 *it6505, u8 *sha1_input)
|
||||
{
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
u8 binfo[2];
|
||||
int down_stream_count, i, err, msg_count = 0;
|
||||
|
||||
@ -2012,7 +2012,7 @@ static int it6505_setup_sha1_input(struct it6505 *it6505, u8 *sha1_input)
|
||||
|
||||
static bool it6505_hdcp_part2_ksvlist_check(struct it6505 *it6505)
|
||||
{
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
u8 av[5][4], bv[5][4];
|
||||
int i, err;
|
||||
|
||||
@ -2045,7 +2045,7 @@ static void it6505_hdcp_wait_ksv_list(struct work_struct *work)
|
||||
{
|
||||
struct it6505 *it6505 = container_of(work, struct it6505,
|
||||
hdcp_wait_ksv_list);
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
unsigned int timeout = 5000;
|
||||
u8 bstatus = 0;
|
||||
bool ksv_list_check;
|
||||
@ -2087,7 +2087,7 @@ static void it6505_hdcp_work(struct work_struct *work)
|
||||
{
|
||||
struct it6505 *it6505 = container_of(work, struct it6505,
|
||||
hdcp_work.work);
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
int ret;
|
||||
u8 link_status[DP_LINK_STATUS_SIZE] = { 0 };
|
||||
|
||||
@ -2128,7 +2128,7 @@ static void it6505_hdcp_work(struct work_struct *work)
|
||||
|
||||
static void it6505_show_hdcp_info(struct it6505 *it6505)
|
||||
{
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
int i;
|
||||
u8 *sha1 = it6505->sha1_input;
|
||||
|
||||
@ -2162,7 +2162,7 @@ static void it6505_stop_link_train(struct it6505 *it6505)
|
||||
|
||||
static void it6505_link_train_ok(struct it6505 *it6505)
|
||||
{
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
|
||||
it6505->link_state = LINK_OK;
|
||||
/* disalbe mute enable avi info frame */
|
||||
@ -2181,7 +2181,7 @@ static void it6505_link_train_ok(struct it6505 *it6505)
|
||||
|
||||
static void it6505_link_step_train_process(struct it6505 *it6505)
|
||||
{
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
int ret, i, step_retry = 3;
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "Start step train");
|
||||
@ -2219,7 +2219,7 @@ static void it6505_link_step_train_process(struct it6505 *it6505)
|
||||
static void it6505_link_training_work(struct work_struct *work)
|
||||
{
|
||||
struct it6505 *it6505 = container_of(work, struct it6505, link_works);
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
int ret;
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "it6505->sink_count: %d",
|
||||
@ -2267,7 +2267,7 @@ static void it6505_remove_edid(struct it6505 *it6505)
|
||||
|
||||
static int it6505_process_hpd_irq(struct it6505 *it6505)
|
||||
{
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
int ret, dpcd_sink_count, dp_irq_vector, bstatus;
|
||||
u8 link_status[DP_LINK_STATUS_SIZE];
|
||||
|
||||
@ -2331,7 +2331,7 @@ static int it6505_process_hpd_irq(struct it6505 *it6505)
|
||||
|
||||
static void it6505_irq_hpd(struct it6505 *it6505)
|
||||
{
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
int dp_sink_count;
|
||||
|
||||
it6505->hpd_state = it6505_get_sink_hpd_status(it6505);
|
||||
@ -2393,7 +2393,7 @@ static void it6505_irq_hpd(struct it6505 *it6505)
|
||||
|
||||
static void it6505_irq_hpd_irq(struct it6505 *it6505)
|
||||
{
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "hpd_irq interrupt");
|
||||
|
||||
@ -2403,7 +2403,7 @@ static void it6505_irq_hpd_irq(struct it6505 *it6505)
|
||||
|
||||
static void it6505_irq_scdt(struct it6505 *it6505)
|
||||
{
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
bool data;
|
||||
|
||||
data = it6505_get_video_status(it6505);
|
||||
@ -2418,7 +2418,7 @@ static void it6505_irq_scdt(struct it6505 *it6505)
|
||||
|
||||
static void it6505_irq_hdcp_done(struct it6505 *it6505)
|
||||
{
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "hdcp done interrupt");
|
||||
it6505->hdcp_status = HDCP_AUTH_DONE;
|
||||
@ -2427,7 +2427,7 @@ static void it6505_irq_hdcp_done(struct it6505 *it6505)
|
||||
|
||||
static void it6505_irq_hdcp_fail(struct it6505 *it6505)
|
||||
{
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "hdcp fail interrupt");
|
||||
it6505->hdcp_status = HDCP_AUTH_IDLE;
|
||||
@ -2437,14 +2437,14 @@ static void it6505_irq_hdcp_fail(struct it6505 *it6505)
|
||||
|
||||
static void it6505_irq_aux_cmd_fail(struct it6505 *it6505)
|
||||
{
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "AUX PC Request Fail Interrupt");
|
||||
}
|
||||
|
||||
static void it6505_irq_hdcp_ksv_check(struct it6505 *it6505)
|
||||
{
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "HDCP event Interrupt");
|
||||
schedule_work(&it6505->hdcp_wait_ksv_list);
|
||||
@ -2452,7 +2452,7 @@ static void it6505_irq_hdcp_ksv_check(struct it6505 *it6505)
|
||||
|
||||
static void it6505_irq_audio_fifo_error(struct it6505 *it6505)
|
||||
{
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "audio fifo error Interrupt");
|
||||
|
||||
@ -2462,7 +2462,7 @@ static void it6505_irq_audio_fifo_error(struct it6505 *it6505)
|
||||
|
||||
static void it6505_irq_link_train_fail(struct it6505 *it6505)
|
||||
{
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "link training fail interrupt");
|
||||
schedule_work(&it6505->link_works);
|
||||
@ -2470,7 +2470,7 @@ static void it6505_irq_link_train_fail(struct it6505 *it6505)
|
||||
|
||||
static void it6505_irq_video_fifo_error(struct it6505 *it6505)
|
||||
{
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "video fifo overflow interrupt");
|
||||
it6505->auto_train_retry = AUTO_TRAIN_RETRY;
|
||||
@ -2481,7 +2481,7 @@ static void it6505_irq_video_fifo_error(struct it6505 *it6505)
|
||||
|
||||
static void it6505_irq_io_latch_fifo_overflow(struct it6505 *it6505)
|
||||
{
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "IO latch fifo overflow interrupt");
|
||||
it6505->auto_train_retry = AUTO_TRAIN_RETRY;
|
||||
@ -2498,7 +2498,7 @@ static bool it6505_test_bit(unsigned int bit, const unsigned int *addr)
|
||||
static irqreturn_t it6505_int_threaded_handler(int unused, void *data)
|
||||
{
|
||||
struct it6505 *it6505 = data;
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
static const struct {
|
||||
int bit;
|
||||
void (*handler)(struct it6505 *it6505);
|
||||
@ -2550,7 +2550,7 @@ static irqreturn_t it6505_int_threaded_handler(int unused, void *data)
|
||||
|
||||
static int it6505_poweron(struct it6505 *it6505)
|
||||
{
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
struct it6505_platform_data *pdata = &it6505->pdata;
|
||||
int err;
|
||||
|
||||
@ -2599,7 +2599,7 @@ static int it6505_poweron(struct it6505 *it6505)
|
||||
|
||||
static int it6505_poweroff(struct it6505 *it6505)
|
||||
{
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
struct it6505_platform_data *pdata = &it6505->pdata;
|
||||
int err;
|
||||
|
||||
@ -2633,7 +2633,7 @@ static int it6505_poweroff(struct it6505 *it6505)
|
||||
|
||||
static enum drm_connector_status it6505_detect(struct it6505 *it6505)
|
||||
{
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
enum drm_connector_status status = connector_status_disconnected;
|
||||
int dp_sink_count;
|
||||
|
||||
@ -2694,7 +2694,7 @@ static int it6505_extcon_notifier(struct notifier_block *self,
|
||||
static void it6505_extcon_work(struct work_struct *work)
|
||||
{
|
||||
struct it6505 *it6505 = container_of(work, struct it6505, extcon_wq);
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
int state, ret;
|
||||
|
||||
if (it6505->enable_drv_hold)
|
||||
@ -2739,11 +2739,11 @@ unlock:
|
||||
static int it6505_use_notifier_module(struct it6505 *it6505)
|
||||
{
|
||||
int ret;
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
|
||||
it6505->event_nb.notifier_call = it6505_extcon_notifier;
|
||||
INIT_WORK(&it6505->extcon_wq, it6505_extcon_work);
|
||||
ret = devm_extcon_register_notifier(&it6505->client->dev,
|
||||
ret = devm_extcon_register_notifier(it6505->dev,
|
||||
it6505->extcon, EXTCON_DISP_DP,
|
||||
&it6505->event_nb);
|
||||
if (ret) {
|
||||
@ -2759,7 +2759,7 @@ static int it6505_use_notifier_module(struct it6505 *it6505)
|
||||
static void it6505_remove_notifier_module(struct it6505 *it6505)
|
||||
{
|
||||
if (it6505->extcon) {
|
||||
devm_extcon_unregister_notifier(&it6505->client->dev,
|
||||
devm_extcon_unregister_notifier(it6505->dev,
|
||||
it6505->extcon, EXTCON_DISP_DP,
|
||||
&it6505->event_nb);
|
||||
|
||||
@ -2772,7 +2772,7 @@ static void __maybe_unused it6505_delayed_audio(struct work_struct *work)
|
||||
struct it6505 *it6505 = container_of(work, struct it6505,
|
||||
delayed_audio.work);
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(&it6505->client->dev, "start");
|
||||
DRM_DEV_DEBUG_DRIVER(it6505->dev, "start");
|
||||
|
||||
if (!it6505->powered)
|
||||
return;
|
||||
@ -2785,7 +2785,7 @@ static int __maybe_unused it6505_audio_setup_hw_params(struct it6505 *it6505,
|
||||
struct hdmi_codec_params
|
||||
*params)
|
||||
{
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
int i = 0;
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "%s %d Hz, %d bit, %d channels\n", __func__,
|
||||
@ -2869,7 +2869,7 @@ static int it6505_bridge_attach(struct drm_bridge *bridge,
|
||||
enum drm_bridge_attach_flags flags)
|
||||
{
|
||||
struct it6505 *it6505 = bridge_to_it6505(bridge);
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
int ret;
|
||||
|
||||
if (!(flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR)) {
|
||||
@ -2933,7 +2933,7 @@ static void it6505_bridge_atomic_enable(struct drm_bridge *bridge,
|
||||
struct drm_bridge_state *old_state)
|
||||
{
|
||||
struct it6505 *it6505 = bridge_to_it6505(bridge);
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
struct drm_atomic_state *state = old_state->base.state;
|
||||
struct hdmi_avi_infoframe frame;
|
||||
struct drm_crtc_state *crtc_state;
|
||||
@ -2989,7 +2989,7 @@ static void it6505_bridge_atomic_disable(struct drm_bridge *bridge,
|
||||
struct drm_bridge_state *old_state)
|
||||
{
|
||||
struct it6505 *it6505 = bridge_to_it6505(bridge);
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "start");
|
||||
|
||||
@ -3004,7 +3004,7 @@ static void it6505_bridge_atomic_pre_enable(struct drm_bridge *bridge,
|
||||
struct drm_bridge_state *old_state)
|
||||
{
|
||||
struct it6505 *it6505 = bridge_to_it6505(bridge);
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "start");
|
||||
|
||||
@ -3015,7 +3015,7 @@ static void it6505_bridge_atomic_post_disable(struct drm_bridge *bridge,
|
||||
struct drm_bridge_state *old_state)
|
||||
{
|
||||
struct it6505 *it6505 = bridge_to_it6505(bridge);
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "start");
|
||||
|
||||
@ -3034,7 +3034,7 @@ static struct edid *it6505_bridge_get_edid(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector)
|
||||
{
|
||||
struct it6505 *it6505 = bridge_to_it6505(bridge);
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
|
||||
if (!it6505->cached_edid) {
|
||||
it6505->cached_edid = drm_do_get_edid(connector, it6505_get_edid_block,
|
||||
@ -3086,7 +3086,7 @@ static const struct dev_pm_ops it6505_bridge_pm_ops = {
|
||||
static int it6505_init_pdata(struct it6505 *it6505)
|
||||
{
|
||||
struct it6505_platform_data *pdata = &it6505->pdata;
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
|
||||
/* 1.0V digital core power regulator */
|
||||
pdata->pwr18 = devm_regulator_get(dev, "pwr18");
|
||||
@ -3128,7 +3128,7 @@ static int it6505_get_data_lanes_count(const struct device_node *endpoint,
|
||||
|
||||
static void it6505_parse_dt(struct it6505 *it6505)
|
||||
{
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
struct device_node *np = dev->of_node, *ep = NULL;
|
||||
int len;
|
||||
u64 link_frequencies;
|
||||
@ -3333,7 +3333,7 @@ static void debugfs_create_files(struct it6505 *it6505)
|
||||
|
||||
static void debugfs_init(struct it6505 *it6505)
|
||||
{
|
||||
struct device *dev = &it6505->client->dev;
|
||||
struct device *dev = it6505->dev;
|
||||
|
||||
it6505->debugfs = debugfs_create_dir(DEBUGFS_DIR_NAME, NULL);
|
||||
|
||||
@ -3375,7 +3375,7 @@ static int it6505_i2c_probe(struct i2c_client *client)
|
||||
|
||||
it6505->bridge.of_node = client->dev.of_node;
|
||||
it6505->connector_status = connector_status_disconnected;
|
||||
it6505->client = client;
|
||||
it6505->dev = &client->dev;
|
||||
i2c_set_clientdata(client, it6505);
|
||||
|
||||
/* get extcon device from DTS */
|
||||
|
@ -500,8 +500,8 @@ static int tc_pllupdate(struct tc_data *tc, unsigned int pllctrl)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* Wait for PLL to lock: up to 2.09 ms, depending on refclk */
|
||||
usleep_range(3000, 6000);
|
||||
/* Wait for PLL to lock: up to 7.5 ms, depending on refclk */
|
||||
usleep_range(15000, 20000);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -817,7 +817,7 @@ static int tc_set_common_video_mode(struct tc_data *tc,
|
||||
* sync signals
|
||||
*/
|
||||
ret = regmap_write(tc->regmap, VPCTRL0,
|
||||
FIELD_PREP(VSDELAY, 0) |
|
||||
FIELD_PREP(VSDELAY, right_margin + 10) |
|
||||
OPXLFMT_RGB888 | FRMSYNC_DISABLED | MSF_DISABLED);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
@ -62,9 +62,9 @@ static const struct fb_ops drm_fbdev_dma_fb_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
.fb_open = drm_fbdev_dma_fb_open,
|
||||
.fb_release = drm_fbdev_dma_fb_release,
|
||||
__FB_DEFAULT_SYS_OPS_RDWR,
|
||||
__FB_DEFAULT_DMA_OPS_RDWR,
|
||||
DRM_FB_HELPER_DEFAULT_OPS,
|
||||
__FB_DEFAULT_SYS_OPS_DRAW,
|
||||
__FB_DEFAULT_DMA_OPS_DRAW,
|
||||
.fb_mmap = drm_fbdev_dma_fb_mmap,
|
||||
.fb_destroy = drm_fbdev_dma_fb_destroy,
|
||||
};
|
||||
@ -123,7 +123,6 @@ static int drm_fbdev_dma_helper_fb_probe(struct drm_fb_helper *fb_helper,
|
||||
drm_fb_helper_fill_info(info, fb_helper, sizes);
|
||||
|
||||
info->fbops = &drm_fbdev_dma_fb_ops;
|
||||
info->flags = FBINFO_DEFAULT;
|
||||
|
||||
/* screen */
|
||||
info->flags |= FBINFO_VIRTFB; /* system memory */
|
||||
|
@ -109,7 +109,6 @@ static int drm_fbdev_generic_helper_fb_probe(struct drm_fb_helper *fb_helper,
|
||||
drm_fb_helper_fill_info(info, fb_helper, sizes);
|
||||
|
||||
info->fbops = &drm_fbdev_generic_fb_ops;
|
||||
info->flags = FBINFO_DEFAULT;
|
||||
|
||||
/* screen */
|
||||
info->flags |= FBINFO_VIRTFB | FBINFO_READS_FAST;
|
||||
|
@ -196,7 +196,7 @@ void *drmm_kmalloc(struct drm_device *dev, size_t size, gfp_t gfp)
|
||||
size, gfp);
|
||||
return NULL;
|
||||
}
|
||||
dr->node.name = kstrdup_const("kmalloc", GFP_KERNEL);
|
||||
dr->node.name = kstrdup_const("kmalloc", gfp);
|
||||
|
||||
add_dr(dev, dr);
|
||||
|
||||
|
@ -7,7 +7,7 @@ config DRM_EXYNOS
|
||||
select DRM_DISPLAY_HELPER if DRM_EXYNOS_DP
|
||||
select DRM_KMS_HELPER
|
||||
select VIDEOMODE_HELPERS
|
||||
select FB_IO_HELPERS if DRM_FBDEV_EMULATION
|
||||
select FB_DMA_HELPERS if DRM_FBDEV_EMULATION
|
||||
select SND_SOC_HDMI_CODEC if SND_SOC
|
||||
help
|
||||
Choose this option if you have a Samsung SoC Exynos chipset.
|
||||
|
@ -49,9 +49,9 @@ static void exynos_drm_fb_destroy(struct fb_info *info)
|
||||
|
||||
static const struct fb_ops exynos_drm_fb_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
__FB_DEFAULT_IO_OPS_RDWR,
|
||||
__FB_DEFAULT_DMA_OPS_RDWR,
|
||||
DRM_FB_HELPER_DEFAULT_OPS,
|
||||
__FB_DEFAULT_IO_OPS_DRAW,
|
||||
__FB_DEFAULT_DMA_OPS_DRAW,
|
||||
.fb_mmap = exynos_drm_fb_mmap,
|
||||
.fb_destroy = exynos_drm_fb_destroy,
|
||||
};
|
||||
@ -79,6 +79,7 @@ static int exynos_drm_fbdev_update(struct drm_fb_helper *helper,
|
||||
offset = fbi->var.xoffset * fb->format->cpp[0];
|
||||
offset += fbi->var.yoffset * fb->pitches[0];
|
||||
|
||||
fbi->flags |= FBINFO_VIRTFB;
|
||||
fbi->screen_buffer = exynos_gem->kvaddr + offset;
|
||||
fbi->screen_size = size;
|
||||
fbi->fix.smem_len = size;
|
||||
|
@ -215,7 +215,7 @@ static int psb_fbdev_fb_probe(struct drm_fb_helper *fb_helper,
|
||||
}
|
||||
|
||||
info->fbops = &psb_fbdev_fb_ops;
|
||||
info->flags = FBINFO_DEFAULT;
|
||||
|
||||
/* Accessed stolen memory directly */
|
||||
info->screen_base = dev_priv->vram_addr + backing->offset;
|
||||
info->screen_size = size;
|
||||
|
@ -4,7 +4,7 @@ config DRM_OMAP
|
||||
depends on DRM && OF
|
||||
depends on ARCH_OMAP2PLUS
|
||||
select DRM_KMS_HELPER
|
||||
select FB_SYS_HELPERS if DRM_FBDEV_EMULATION
|
||||
select FB_DMA_HELPERS if DRM_FBDEV_EMULATION
|
||||
select VIDEOMODE_HELPERS
|
||||
select HDMI
|
||||
default n
|
||||
|
@ -636,17 +636,7 @@ static int dev_open(struct drm_device *dev, struct drm_file *file)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct file_operations omapdriver_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = drm_open,
|
||||
.unlocked_ioctl = drm_ioctl,
|
||||
.compat_ioctl = drm_compat_ioctl,
|
||||
.release = drm_release,
|
||||
.mmap = omap_gem_mmap,
|
||||
.poll = drm_poll,
|
||||
.read = drm_read,
|
||||
.llseek = noop_llseek,
|
||||
};
|
||||
DEFINE_DRM_GEM_FOPS(omapdriver_fops);
|
||||
|
||||
static const struct drm_driver omap_drm_driver = {
|
||||
.driver_features = DRIVER_MODESET | DRIVER_GEM |
|
||||
|
@ -76,6 +76,15 @@ fallback:
|
||||
return drm_fb_helper_pan_display(var, fbi);
|
||||
}
|
||||
|
||||
static int omap_fbdev_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
|
||||
{
|
||||
struct drm_fb_helper *helper = info->par;
|
||||
struct drm_framebuffer *fb = helper->fb;
|
||||
struct drm_gem_object *bo = drm_gem_fb_get_obj(fb, 0);
|
||||
|
||||
return drm_gem_mmap_obj(bo, omap_gem_mmap_size(bo), vma);
|
||||
}
|
||||
|
||||
static void omap_fbdev_fb_destroy(struct fb_info *info)
|
||||
{
|
||||
struct drm_fb_helper *helper = info->par;
|
||||
@ -97,14 +106,16 @@ static void omap_fbdev_fb_destroy(struct fb_info *info)
|
||||
|
||||
static const struct fb_ops omap_fb_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
FB_DEFAULT_SYS_OPS,
|
||||
__FB_DEFAULT_DMA_OPS_RDWR,
|
||||
.fb_check_var = drm_fb_helper_check_var,
|
||||
.fb_set_par = drm_fb_helper_set_par,
|
||||
.fb_setcmap = drm_fb_helper_setcmap,
|
||||
.fb_blank = drm_fb_helper_blank,
|
||||
.fb_pan_display = omap_fbdev_pan_display,
|
||||
__FB_DEFAULT_DMA_OPS_DRAW,
|
||||
.fb_ioctl = drm_fb_helper_ioctl,
|
||||
.fb_destroy = omap_fbdev_fb_destroy,
|
||||
.fb_mmap = omap_fbdev_fb_mmap,
|
||||
.fb_destroy = omap_fbdev_fb_destroy,
|
||||
};
|
||||
|
||||
static int omap_fbdev_create(struct drm_fb_helper *helper,
|
||||
@ -196,6 +207,7 @@ static int omap_fbdev_create(struct drm_fb_helper *helper,
|
||||
|
||||
drm_fb_helper_fill_info(fbi, helper, sizes);
|
||||
|
||||
fbi->flags |= FBINFO_VIRTFB;
|
||||
fbi->screen_buffer = omap_gem_vaddr(bo);
|
||||
fbi->screen_size = bo->size;
|
||||
fbi->fix.smem_start = dma_addr;
|
||||
|
@ -524,26 +524,11 @@ fail:
|
||||
return ret;
|
||||
}
|
||||
|
||||
/** We override mainly to fix up some of the vm mapping flags.. */
|
||||
int omap_gem_mmap(struct file *filp, struct vm_area_struct *vma)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = drm_gem_mmap(filp, vma);
|
||||
if (ret) {
|
||||
DBG("mmap failed: %d", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return omap_gem_mmap_obj(vma->vm_private_data, vma);
|
||||
}
|
||||
|
||||
int omap_gem_mmap_obj(struct drm_gem_object *obj,
|
||||
struct vm_area_struct *vma)
|
||||
static int omap_gem_object_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma)
|
||||
{
|
||||
struct omap_gem_object *omap_obj = to_omap_bo(obj);
|
||||
|
||||
vm_flags_mod(vma, VM_MIXEDMAP, VM_PFNMAP);
|
||||
vm_flags_set(vma, VM_DONTEXPAND | VM_DONTDUMP | VM_IO | VM_MIXEDMAP);
|
||||
|
||||
if (omap_obj->flags & OMAP_BO_WC) {
|
||||
vma->vm_page_prot = pgprot_writecombine(vm_get_page_prot(vma->vm_flags));
|
||||
@ -563,12 +548,14 @@ int omap_gem_mmap_obj(struct drm_gem_object *obj,
|
||||
* address_space (so unmap_mapping_range does what we want,
|
||||
* in particular in the case of mmap'd dmabufs)
|
||||
*/
|
||||
vma->vm_pgoff = 0;
|
||||
vma->vm_pgoff -= drm_vma_node_start(&obj->vma_node);
|
||||
vma_set_file(vma, obj->filp);
|
||||
|
||||
vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
|
||||
}
|
||||
|
||||
vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1282,6 +1269,7 @@ static const struct vm_operations_struct omap_gem_vm_ops = {
|
||||
static const struct drm_gem_object_funcs omap_gem_object_funcs = {
|
||||
.free = omap_gem_free_object,
|
||||
.export = omap_gem_prime_export,
|
||||
.mmap = omap_gem_object_mmap,
|
||||
.vm_ops = &omap_gem_vm_ops,
|
||||
};
|
||||
|
||||
|
@ -57,9 +57,6 @@ int omap_gem_dumb_create(struct drm_file *file, struct drm_device *dev,
|
||||
struct drm_mode_create_dumb *args);
|
||||
|
||||
/* mmap() Interface */
|
||||
int omap_gem_mmap(struct file *filp, struct vm_area_struct *vma);
|
||||
int omap_gem_mmap_obj(struct drm_gem_object *obj,
|
||||
struct vm_area_struct *vma);
|
||||
u64 omap_gem_mmap_offset(struct drm_gem_object *obj);
|
||||
size_t omap_gem_mmap_size(struct drm_gem_object *obj);
|
||||
|
||||
|
@ -64,13 +64,8 @@ static int omap_gem_dmabuf_mmap(struct dma_buf *buffer,
|
||||
struct vm_area_struct *vma)
|
||||
{
|
||||
struct drm_gem_object *obj = buffer->priv;
|
||||
int ret = 0;
|
||||
|
||||
ret = drm_gem_mmap_obj(obj, omap_gem_mmap_size(obj), vma);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
return omap_gem_mmap_obj(obj, vma);
|
||||
return drm_gem_mmap_obj(obj, omap_gem_mmap_size(obj), vma);
|
||||
}
|
||||
|
||||
static const struct dma_buf_ops omap_dmabuf_ops = {
|
||||
|
@ -300,6 +300,7 @@ config DRM_PANEL_LEADTEK_LTK500HD1829
|
||||
config DRM_PANEL_SAMSUNG_LD9040
|
||||
tristate "Samsung LD9040 RGB/SPI panel"
|
||||
depends on OF && SPI
|
||||
depends on BACKLIGHT_CLASS_DEVICE
|
||||
select VIDEOMODE_HELPERS
|
||||
|
||||
config DRM_PANEL_LG_LB035Q02
|
||||
|
@ -56,10 +56,6 @@ struct db7430 {
|
||||
struct mipi_dbi dbi;
|
||||
/** @panel: the DRM panel instance for this device */
|
||||
struct drm_panel panel;
|
||||
/** @width: the width of this panel in mm */
|
||||
u32 width;
|
||||
/** @height: the height of this panel in mm */
|
||||
u32 height;
|
||||
/** @reset: reset GPIO line */
|
||||
struct gpio_desc *reset;
|
||||
/** @regulators: VCCIO and VIO supply regulators */
|
||||
|
@ -253,7 +253,7 @@ static int radeon_fbdev_fb_helper_fb_probe(struct drm_fb_helper *fb_helper,
|
||||
}
|
||||
|
||||
info->fbops = &radeon_fbdev_fb_ops;
|
||||
info->flags = FBINFO_DEFAULT;
|
||||
|
||||
/* radeon resume is fragile and needs a vt switch to help it along */
|
||||
info->skip_vt_switch = false;
|
||||
|
||||
|
@ -141,43 +141,24 @@ const struct ssd130x_deviceinfo ssd130x_variants[] = {
|
||||
};
|
||||
EXPORT_SYMBOL_NS_GPL(ssd130x_variants, DRM_SSD130X);
|
||||
|
||||
struct ssd130x_plane_state {
|
||||
struct drm_plane_state base;
|
||||
/* Intermediate buffer to convert pixels from XRGB8888 to HW format */
|
||||
u8 *buffer;
|
||||
/* Buffer to store pixels in HW format and written to the panel */
|
||||
u8 *data_array;
|
||||
};
|
||||
|
||||
static inline struct ssd130x_plane_state *to_ssd130x_plane_state(struct drm_plane_state *state)
|
||||
{
|
||||
return container_of(state, struct ssd130x_plane_state, base);
|
||||
}
|
||||
|
||||
static inline struct ssd130x_device *drm_to_ssd130x(struct drm_device *drm)
|
||||
{
|
||||
return container_of(drm, struct ssd130x_device, drm);
|
||||
}
|
||||
|
||||
static int ssd130x_buf_alloc(struct ssd130x_device *ssd130x)
|
||||
{
|
||||
unsigned int page_height = ssd130x->device_info->page_height;
|
||||
unsigned int pages = DIV_ROUND_UP(ssd130x->height, page_height);
|
||||
const struct drm_format_info *fi;
|
||||
unsigned int pitch;
|
||||
|
||||
fi = drm_format_info(DRM_FORMAT_R1);
|
||||
if (!fi)
|
||||
return -EINVAL;
|
||||
|
||||
pitch = drm_format_info_min_pitch(fi, 0, ssd130x->width);
|
||||
|
||||
ssd130x->buffer = kcalloc(pitch, ssd130x->height, GFP_KERNEL);
|
||||
if (!ssd130x->buffer)
|
||||
return -ENOMEM;
|
||||
|
||||
ssd130x->data_array = kcalloc(ssd130x->width, pages, GFP_KERNEL);
|
||||
if (!ssd130x->data_array) {
|
||||
kfree(ssd130x->buffer);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ssd130x_buf_free(struct ssd130x_device *ssd130x)
|
||||
{
|
||||
kfree(ssd130x->data_array);
|
||||
kfree(ssd130x->buffer);
|
||||
}
|
||||
|
||||
/*
|
||||
* Helper to write data (SSD130X_DATA) to the device.
|
||||
*/
|
||||
@ -466,12 +447,14 @@ static int ssd130x_init(struct ssd130x_device *ssd130x)
|
||||
SSD130X_SET_ADDRESS_MODE_HORIZONTAL);
|
||||
}
|
||||
|
||||
static int ssd130x_update_rect(struct ssd130x_device *ssd130x, struct drm_rect *rect)
|
||||
static int ssd130x_update_rect(struct ssd130x_device *ssd130x,
|
||||
struct ssd130x_plane_state *ssd130x_state,
|
||||
struct drm_rect *rect)
|
||||
{
|
||||
unsigned int x = rect->x1;
|
||||
unsigned int y = rect->y1;
|
||||
u8 *buf = ssd130x->buffer;
|
||||
u8 *data_array = ssd130x->data_array;
|
||||
u8 *buf = ssd130x_state->buffer;
|
||||
u8 *data_array = ssd130x_state->data_array;
|
||||
unsigned int width = drm_rect_width(rect);
|
||||
unsigned int height = drm_rect_height(rect);
|
||||
unsigned int line_length = DIV_ROUND_UP(width, 8);
|
||||
@ -567,7 +550,8 @@ static int ssd130x_update_rect(struct ssd130x_device *ssd130x, struct drm_rect *
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void ssd130x_clear_screen(struct ssd130x_device *ssd130x)
|
||||
static void ssd130x_clear_screen(struct ssd130x_device *ssd130x,
|
||||
struct ssd130x_plane_state *ssd130x_state)
|
||||
{
|
||||
struct drm_rect fullscreen = {
|
||||
.x1 = 0,
|
||||
@ -576,27 +560,27 @@ static void ssd130x_clear_screen(struct ssd130x_device *ssd130x)
|
||||
.y2 = ssd130x->height,
|
||||
};
|
||||
|
||||
ssd130x_update_rect(ssd130x, &fullscreen);
|
||||
ssd130x_update_rect(ssd130x, ssd130x_state, &fullscreen);
|
||||
}
|
||||
|
||||
static int ssd130x_fb_blit_rect(struct drm_framebuffer *fb, const struct iosys_map *vmap,
|
||||
static int ssd130x_fb_blit_rect(struct drm_plane_state *state,
|
||||
const struct iosys_map *vmap,
|
||||
struct drm_rect *rect)
|
||||
{
|
||||
struct drm_framebuffer *fb = state->fb;
|
||||
struct ssd130x_device *ssd130x = drm_to_ssd130x(fb->dev);
|
||||
unsigned int page_height = ssd130x->device_info->page_height;
|
||||
struct ssd130x_plane_state *ssd130x_state = to_ssd130x_plane_state(state);
|
||||
u8 *buf = ssd130x_state->buffer;
|
||||
struct iosys_map dst;
|
||||
unsigned int dst_pitch;
|
||||
int ret = 0;
|
||||
u8 *buf = ssd130x->buffer;
|
||||
|
||||
if (!buf)
|
||||
return 0;
|
||||
|
||||
/* Align y to display page boundaries */
|
||||
rect->y1 = round_down(rect->y1, page_height);
|
||||
rect->y2 = min_t(unsigned int, round_up(rect->y2, page_height), ssd130x->height);
|
||||
|
||||
dst_pitch = DIV_ROUND_UP(drm_rect_width(rect), page_height);
|
||||
dst_pitch = DIV_ROUND_UP(drm_rect_width(rect), 8);
|
||||
|
||||
ret = drm_gem_fb_begin_cpu_access(fb, DMA_FROM_DEVICE);
|
||||
if (ret)
|
||||
@ -607,11 +591,49 @@ static int ssd130x_fb_blit_rect(struct drm_framebuffer *fb, const struct iosys_m
|
||||
|
||||
drm_gem_fb_end_cpu_access(fb, DMA_FROM_DEVICE);
|
||||
|
||||
ssd130x_update_rect(ssd130x, rect);
|
||||
ssd130x_update_rect(ssd130x, ssd130x_state, rect);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ssd130x_primary_plane_helper_atomic_check(struct drm_plane *plane,
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_device *drm = plane->dev;
|
||||
struct ssd130x_device *ssd130x = drm_to_ssd130x(drm);
|
||||
struct drm_plane_state *plane_state = drm_atomic_get_new_plane_state(state, plane);
|
||||
struct ssd130x_plane_state *ssd130x_state = to_ssd130x_plane_state(plane_state);
|
||||
unsigned int page_height = ssd130x->device_info->page_height;
|
||||
unsigned int pages = DIV_ROUND_UP(ssd130x->height, page_height);
|
||||
const struct drm_format_info *fi;
|
||||
unsigned int pitch;
|
||||
int ret;
|
||||
|
||||
ret = drm_plane_helper_atomic_check(plane, state);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
fi = drm_format_info(DRM_FORMAT_R1);
|
||||
if (!fi)
|
||||
return -EINVAL;
|
||||
|
||||
pitch = drm_format_info_min_pitch(fi, 0, ssd130x->width);
|
||||
|
||||
ssd130x_state->buffer = kcalloc(pitch, ssd130x->height, GFP_KERNEL);
|
||||
if (!ssd130x_state->buffer)
|
||||
return -ENOMEM;
|
||||
|
||||
ssd130x_state->data_array = kcalloc(ssd130x->width, pages, GFP_KERNEL);
|
||||
if (!ssd130x_state->data_array) {
|
||||
kfree(ssd130x_state->buffer);
|
||||
/* Set to prevent a double free in .atomic_destroy_state() */
|
||||
ssd130x_state->buffer = NULL;
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ssd130x_primary_plane_helper_atomic_update(struct drm_plane *plane,
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
@ -634,7 +656,7 @@ static void ssd130x_primary_plane_helper_atomic_update(struct drm_plane *plane,
|
||||
if (!drm_rect_intersect(&dst_clip, &damage))
|
||||
continue;
|
||||
|
||||
ssd130x_fb_blit_rect(plane_state->fb, &shadow_plane_state->data[0], &dst_clip);
|
||||
ssd130x_fb_blit_rect(plane_state, &shadow_plane_state->data[0], &dst_clip);
|
||||
}
|
||||
|
||||
drm_dev_exit(idx);
|
||||
@ -645,19 +667,69 @@ static void ssd130x_primary_plane_helper_atomic_disable(struct drm_plane *plane,
|
||||
{
|
||||
struct drm_device *drm = plane->dev;
|
||||
struct ssd130x_device *ssd130x = drm_to_ssd130x(drm);
|
||||
struct ssd130x_plane_state *ssd130x_state = to_ssd130x_plane_state(plane->state);
|
||||
int idx;
|
||||
|
||||
if (!drm_dev_enter(drm, &idx))
|
||||
return;
|
||||
|
||||
ssd130x_clear_screen(ssd130x);
|
||||
ssd130x_clear_screen(ssd130x, ssd130x_state);
|
||||
|
||||
drm_dev_exit(idx);
|
||||
}
|
||||
|
||||
/* Called during init to allocate the plane's atomic state. */
|
||||
static void ssd130x_primary_plane_reset(struct drm_plane *plane)
|
||||
{
|
||||
struct ssd130x_plane_state *ssd130x_state;
|
||||
|
||||
WARN_ON(plane->state);
|
||||
|
||||
ssd130x_state = kzalloc(sizeof(*ssd130x_state), GFP_KERNEL);
|
||||
if (!ssd130x_state)
|
||||
return;
|
||||
|
||||
__drm_atomic_helper_plane_reset(plane, &ssd130x_state->base);
|
||||
}
|
||||
|
||||
static struct drm_plane_state *ssd130x_primary_plane_duplicate_state(struct drm_plane *plane)
|
||||
{
|
||||
struct ssd130x_plane_state *old_ssd130x_state;
|
||||
struct ssd130x_plane_state *ssd130x_state;
|
||||
|
||||
if (WARN_ON(!plane->state))
|
||||
return NULL;
|
||||
|
||||
old_ssd130x_state = to_ssd130x_plane_state(plane->state);
|
||||
ssd130x_state = kmemdup(old_ssd130x_state, sizeof(*ssd130x_state), GFP_KERNEL);
|
||||
if (!ssd130x_state)
|
||||
return NULL;
|
||||
|
||||
/* The buffers are not duplicated and are allocated in .atomic_check */
|
||||
ssd130x_state->buffer = NULL;
|
||||
ssd130x_state->data_array = NULL;
|
||||
|
||||
__drm_atomic_helper_plane_duplicate_state(plane, &ssd130x_state->base);
|
||||
|
||||
return &ssd130x_state->base;
|
||||
}
|
||||
|
||||
static void ssd130x_primary_plane_destroy_state(struct drm_plane *plane,
|
||||
struct drm_plane_state *state)
|
||||
{
|
||||
struct ssd130x_plane_state *ssd130x_state = to_ssd130x_plane_state(state);
|
||||
|
||||
kfree(ssd130x_state->data_array);
|
||||
kfree(ssd130x_state->buffer);
|
||||
|
||||
__drm_atomic_helper_plane_destroy_state(&ssd130x_state->base);
|
||||
|
||||
kfree(ssd130x_state);
|
||||
}
|
||||
|
||||
static const struct drm_plane_helper_funcs ssd130x_primary_plane_helper_funcs = {
|
||||
DRM_GEM_SHADOW_PLANE_HELPER_FUNCS,
|
||||
.atomic_check = drm_plane_helper_atomic_check,
|
||||
.atomic_check = ssd130x_primary_plane_helper_atomic_check,
|
||||
.atomic_update = ssd130x_primary_plane_helper_atomic_update,
|
||||
.atomic_disable = ssd130x_primary_plane_helper_atomic_disable,
|
||||
};
|
||||
@ -665,6 +737,9 @@ static const struct drm_plane_helper_funcs ssd130x_primary_plane_helper_funcs =
|
||||
static const struct drm_plane_funcs ssd130x_primary_plane_funcs = {
|
||||
.update_plane = drm_atomic_helper_update_plane,
|
||||
.disable_plane = drm_atomic_helper_disable_plane,
|
||||
.reset = ssd130x_primary_plane_reset,
|
||||
.atomic_duplicate_state = ssd130x_primary_plane_duplicate_state,
|
||||
.atomic_destroy_state = ssd130x_primary_plane_destroy_state,
|
||||
.destroy = drm_plane_cleanup,
|
||||
DRM_GEM_SHADOW_PLANE_FUNCS,
|
||||
};
|
||||
@ -719,10 +794,6 @@ static void ssd130x_encoder_helper_atomic_enable(struct drm_encoder *encoder,
|
||||
if (ret)
|
||||
goto power_off;
|
||||
|
||||
ret = ssd130x_buf_alloc(ssd130x);
|
||||
if (ret)
|
||||
goto power_off;
|
||||
|
||||
ssd130x_write_cmd(ssd130x, 1, SSD130X_DISPLAY_ON);
|
||||
|
||||
backlight_enable(ssd130x->bl_dev);
|
||||
@ -744,8 +815,6 @@ static void ssd130x_encoder_helper_atomic_disable(struct drm_encoder *encoder,
|
||||
|
||||
ssd130x_write_cmd(ssd130x, 1, SSD130X_DISPLAY_OFF);
|
||||
|
||||
ssd130x_buf_free(ssd130x);
|
||||
|
||||
ssd130x_power_off(ssd130x);
|
||||
}
|
||||
|
||||
|
@ -89,9 +89,6 @@ struct ssd130x_device {
|
||||
u8 col_end;
|
||||
u8 page_start;
|
||||
u8 page_end;
|
||||
|
||||
u8 *buffer;
|
||||
u8 *data_array;
|
||||
};
|
||||
|
||||
extern const struct ssd130x_deviceinfo ssd130x_variants[];
|
||||
|
@ -12,7 +12,7 @@ config DRM_TEGRA
|
||||
select DRM_KMS_HELPER
|
||||
select DRM_MIPI_DSI
|
||||
select DRM_PANEL
|
||||
select FB_SYS_HELPERS if DRM_FBDEV_EMULATION
|
||||
select FB_DMA_HELPERS if DRM_FBDEV_EMULATION
|
||||
select TEGRA_HOST1X
|
||||
select INTERCONNECT
|
||||
select IOMMU_IOVA
|
||||
|
@ -59,9 +59,9 @@ static void tegra_fbdev_fb_destroy(struct fb_info *info)
|
||||
|
||||
static const struct fb_ops tegra_fb_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
__FB_DEFAULT_SYS_OPS_RDWR,
|
||||
__FB_DEFAULT_DMA_OPS_RDWR,
|
||||
DRM_FB_HELPER_DEFAULT_OPS,
|
||||
__FB_DEFAULT_SYS_OPS_DRAW,
|
||||
__FB_DEFAULT_DMA_OPS_DRAW,
|
||||
.fb_mmap = tegra_fb_mmap,
|
||||
.fb_destroy = tegra_fbdev_fb_destroy,
|
||||
};
|
||||
@ -132,7 +132,8 @@ static int tegra_fbdev_probe(struct drm_fb_helper *helper,
|
||||
}
|
||||
}
|
||||
|
||||
info->screen_base = (void __iomem *)bo->vaddr + offset;
|
||||
info->flags |= FBINFO_VIRTFB;
|
||||
info->screen_buffer = bo->vaddr + offset;
|
||||
info->screen_size = size;
|
||||
info->fix.smem_start = (unsigned long)(bo->iova + offset);
|
||||
info->fix.smem_len = size;
|
||||
|
@ -527,7 +527,6 @@ int picolcd_init_framebuffer(struct picolcd_data *data)
|
||||
info->var = picolcdfb_var;
|
||||
info->fix = picolcdfb_fix;
|
||||
info->fix.smem_len = PICOLCDFB_SIZE*8;
|
||||
info->flags = FBINFO_FLAG_DEFAULT;
|
||||
|
||||
fbdata = info->par;
|
||||
spin_lock_init(&fbdata->lock);
|
||||
|
@ -1048,7 +1048,6 @@ static int ivtvfb_init_vidmode(struct ivtv *itv)
|
||||
/* Generate valid fb_info */
|
||||
|
||||
oi->ivtvfb_info.node = -1;
|
||||
oi->ivtvfb_info.flags = FBINFO_FLAG_DEFAULT;
|
||||
oi->ivtvfb_info.par = itv;
|
||||
oi->ivtvfb_info.var = oi->ivtvfb_defined;
|
||||
oi->ivtvfb_info.fix = oi->ivtvfb_fix;
|
||||
|
@ -310,7 +310,6 @@ static int vivid_fb_init_vidmode(struct vivid_dev *dev)
|
||||
/* Generate valid fb_info */
|
||||
|
||||
dev->fb_info.node = -1;
|
||||
dev->fb_info.flags = FBINFO_FLAG_DEFAULT;
|
||||
dev->fb_info.par = dev;
|
||||
dev->fb_info.var = dev->fb_defined;
|
||||
dev->fb_info.fix = dev->fb_fix;
|
||||
|
@ -684,7 +684,7 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display,
|
||||
info->var.transp.offset = 0;
|
||||
info->var.transp.length = 0;
|
||||
|
||||
info->flags = FBINFO_FLAG_DEFAULT | FBINFO_VIRTFB;
|
||||
info->flags = FBINFO_VIRTFB;
|
||||
|
||||
par = info->par;
|
||||
par->info = info;
|
||||
|
@ -807,7 +807,6 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
|
||||
info->screen_base = crtc->v_screen;
|
||||
pr_debug("screen_base vaddr = %p\n", info->screen_base);
|
||||
info->screen_size = line_length * var->yres_virtual;
|
||||
info->flags = FBINFO_FLAG_DEFAULT | 0;
|
||||
|
||||
/* set info->fix */
|
||||
fix->type = FB_TYPE_PACKED_PIXELS;
|
||||
|
@ -25,6 +25,8 @@ config VIDEO_NOMODESET
|
||||
bool
|
||||
default n
|
||||
|
||||
source "drivers/auxdisplay/Kconfig"
|
||||
|
||||
if HAS_IOMEM
|
||||
|
||||
config HAVE_FB_ATMEL
|
||||
|
@ -79,8 +79,8 @@ static const char *const backlight_scale_types[] = {
|
||||
[BACKLIGHT_SCALE_NON_LINEAR] = "non-linear",
|
||||
};
|
||||
|
||||
#if defined(CONFIG_FB) || (defined(CONFIG_FB_MODULE) && \
|
||||
defined(CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE))
|
||||
#if defined(CONFIG_FB_CORE) || (defined(CONFIG_FB_CORE_MODULE) && \
|
||||
defined(CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE))
|
||||
/*
|
||||
* fb_notifier_callback
|
||||
*
|
||||
@ -155,7 +155,7 @@ static inline int backlight_register_fb(struct backlight_device *bd)
|
||||
static inline void backlight_unregister_fb(struct backlight_device *bd)
|
||||
{
|
||||
}
|
||||
#endif /* CONFIG_FB */
|
||||
#endif /* CONFIG_FB_CORE */
|
||||
|
||||
static void backlight_generate_event(struct backlight_device *bd,
|
||||
enum backlight_update_reason reason)
|
||||
|
@ -72,7 +72,7 @@ config DUMMY_CONSOLE_ROWS
|
||||
|
||||
config FRAMEBUFFER_CONSOLE
|
||||
bool "Framebuffer Console support"
|
||||
depends on FB && !UML
|
||||
depends on FB_CORE && !UML
|
||||
select VT_HW_CONSOLE_BINDING
|
||||
select CRC32
|
||||
select FONT_SUPPORT
|
||||
|
@ -448,7 +448,7 @@ static int __init mc68x328fb_init(void)
|
||||
fb_info.var.red.offset = fb_info.var.green.offset = fb_info.var.blue.offset = 0;
|
||||
}
|
||||
fb_info.pseudo_palette = &mc68x328fb_pseudo_palette;
|
||||
fb_info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
|
||||
fb_info.flags = FBINFO_HWACCEL_YPAN;
|
||||
|
||||
if (fb_alloc_cmap(&fb_info.cmap, 256, 0))
|
||||
return -ENOMEM;
|
||||
|
@ -3,13 +3,10 @@
|
||||
# fbdev configuration
|
||||
#
|
||||
|
||||
config FB_NOTIFY
|
||||
bool
|
||||
|
||||
menuconfig FB
|
||||
tristate "Support for frame buffer devices"
|
||||
tristate "Support for frame buffer device drivers"
|
||||
select FB_CORE
|
||||
select FB_NOTIFY
|
||||
select VIDEO_CMDLINE
|
||||
help
|
||||
The frame buffer device provides an abstraction for the graphics
|
||||
hardware. It represents the frame buffer of some video hardware and
|
||||
@ -33,6 +30,12 @@ menuconfig FB
|
||||
<http://www.munted.org.uk/programming/Framebuffer-HOWTO-1.3.html> for more
|
||||
information.
|
||||
|
||||
This enables support for native frame buffer device (fbdev) drivers.
|
||||
|
||||
The DRM subsystem provides support for emulated frame buffer devices
|
||||
on top of KMS drivers, but this option allows legacy fbdev drivers to
|
||||
be enabled as well.
|
||||
|
||||
Say Y here and to the driver for your graphics board below if you
|
||||
are compiling a kernel for a non-x86 architecture.
|
||||
|
||||
@ -42,153 +45,6 @@ menuconfig FB
|
||||
(e.g. an accelerated X server) and that are not frame buffer
|
||||
device-aware may cause unexpected results. If unsure, say N.
|
||||
|
||||
config FIRMWARE_EDID
|
||||
bool "Enable firmware EDID"
|
||||
depends on FB
|
||||
help
|
||||
This enables access to the EDID transferred from the firmware.
|
||||
On the i386, this is from the Video BIOS. Enable this if DDC/I2C
|
||||
transfers do not work for your driver and if you are using
|
||||
nvidiafb, i810fb or savagefb.
|
||||
|
||||
In general, choosing Y for this option is safe. If you
|
||||
experience extremely long delays while booting before you get
|
||||
something on your display, try setting this to N. Matrox cards in
|
||||
combination with certain motherboards and monitors are known to
|
||||
suffer from this problem.
|
||||
|
||||
config FB_DEVICE
|
||||
bool "Provide legacy /dev/fb* device"
|
||||
depends on FB
|
||||
default y
|
||||
help
|
||||
Say Y here if you want the legacy /dev/fb* device file and
|
||||
interfaces within sysfs anc procfs. It is only required if you
|
||||
have userspace programs that depend on fbdev for graphics output.
|
||||
This does not affect the framebuffer console. If unsure, say N.
|
||||
|
||||
config FB_DDC
|
||||
tristate
|
||||
depends on FB
|
||||
select I2C_ALGOBIT
|
||||
select I2C
|
||||
|
||||
config FB_CFB_FILLRECT
|
||||
tristate
|
||||
depends on FB
|
||||
help
|
||||
Include the cfb_fillrect function for generic software rectangle
|
||||
filling. This is used by drivers that don't provide their own
|
||||
(accelerated) version.
|
||||
|
||||
config FB_CFB_COPYAREA
|
||||
tristate
|
||||
depends on FB
|
||||
help
|
||||
Include the cfb_copyarea function for generic software area copying.
|
||||
This is used by drivers that don't provide their own (accelerated)
|
||||
version.
|
||||
|
||||
config FB_CFB_IMAGEBLIT
|
||||
tristate
|
||||
depends on FB
|
||||
help
|
||||
Include the cfb_imageblit function for generic software image
|
||||
blitting. This is used by drivers that don't provide their own
|
||||
(accelerated) version.
|
||||
|
||||
config FB_CFB_REV_PIXELS_IN_BYTE
|
||||
bool
|
||||
depends on FB
|
||||
help
|
||||
Allow generic frame-buffer functions to work on displays with 1, 2
|
||||
and 4 bits per pixel depths which has opposite order of pixels in
|
||||
byte order to bytes in long order.
|
||||
|
||||
config FB_SYS_FILLRECT
|
||||
tristate
|
||||
depends on FB
|
||||
help
|
||||
Include the sys_fillrect function for generic software rectangle
|
||||
filling. This is used by drivers that don't provide their own
|
||||
(accelerated) version and the framebuffer is in system RAM.
|
||||
|
||||
config FB_SYS_COPYAREA
|
||||
tristate
|
||||
depends on FB
|
||||
help
|
||||
Include the sys_copyarea function for generic software area copying.
|
||||
This is used by drivers that don't provide their own (accelerated)
|
||||
version and the framebuffer is in system RAM.
|
||||
|
||||
config FB_SYS_IMAGEBLIT
|
||||
tristate
|
||||
depends on FB
|
||||
help
|
||||
Include the sys_imageblit function for generic software image
|
||||
blitting. This is used by drivers that don't provide their own
|
||||
(accelerated) version and the framebuffer is in system RAM.
|
||||
|
||||
config FB_PROVIDE_GET_FB_UNMAPPED_AREA
|
||||
bool
|
||||
depends on FB
|
||||
help
|
||||
Allow generic frame-buffer to provide get_fb_unmapped_area
|
||||
function to provide shareable character device support on nommu.
|
||||
|
||||
menuconfig FB_FOREIGN_ENDIAN
|
||||
bool "Framebuffer foreign endianness support"
|
||||
depends on FB
|
||||
help
|
||||
This menu will let you enable support for the framebuffers with
|
||||
non-native endianness (e.g. Little-Endian framebuffer on a
|
||||
Big-Endian machine). Most probably you don't have such hardware,
|
||||
so it's safe to say "n" here.
|
||||
|
||||
choice
|
||||
prompt "Choice endianness support"
|
||||
depends on FB_FOREIGN_ENDIAN
|
||||
|
||||
config FB_BOTH_ENDIAN
|
||||
bool "Support for Big- and Little-Endian framebuffers"
|
||||
|
||||
config FB_BIG_ENDIAN
|
||||
bool "Support for Big-Endian framebuffers only"
|
||||
|
||||
config FB_LITTLE_ENDIAN
|
||||
bool "Support for Little-Endian framebuffers only"
|
||||
|
||||
endchoice
|
||||
|
||||
config FB_SYS_FOPS
|
||||
tristate
|
||||
depends on FB
|
||||
|
||||
config FB_DEFERRED_IO
|
||||
bool
|
||||
depends on FB
|
||||
|
||||
config FB_IO_HELPERS
|
||||
bool
|
||||
depends on FB
|
||||
select FB_CFB_COPYAREA
|
||||
select FB_CFB_FILLRECT
|
||||
select FB_CFB_IMAGEBLIT
|
||||
|
||||
config FB_SYS_HELPERS
|
||||
bool
|
||||
depends on FB
|
||||
select FB_SYS_COPYAREA
|
||||
select FB_SYS_FILLRECT
|
||||
select FB_SYS_FOPS
|
||||
select FB_SYS_IMAGEBLIT
|
||||
|
||||
config FB_SYS_HELPERS_DEFERRED
|
||||
bool
|
||||
depends on FB
|
||||
select FB_DEFERRED_IO
|
||||
select FB_SYS_HELPERS
|
||||
|
||||
config FB_HECUBA
|
||||
tristate
|
||||
depends on FB
|
||||
@ -205,41 +61,6 @@ config FB_MACMODES
|
||||
tristate
|
||||
depends on FB
|
||||
|
||||
config FB_BACKLIGHT
|
||||
tristate
|
||||
depends on FB
|
||||
select BACKLIGHT_CLASS_DEVICE
|
||||
|
||||
config FB_MODE_HELPERS
|
||||
bool "Enable Video Mode Handling Helpers"
|
||||
depends on FB
|
||||
help
|
||||
This enables functions for handling video modes using the
|
||||
Generalized Timing Formula and the EDID parser. A few drivers rely
|
||||
on this feature such as the radeonfb, rivafb, and the i810fb. If
|
||||
your driver does not take advantage of this feature, choosing Y will
|
||||
just increase the kernel size by about 5K.
|
||||
|
||||
config FB_TILEBLITTING
|
||||
bool "Enable Tile Blitting Support"
|
||||
depends on FB
|
||||
help
|
||||
This enables tile blitting. Tile blitting is a drawing technique
|
||||
where the screen is divided into rectangular sections (tiles), whereas
|
||||
the standard blitting divides the screen into pixels. Because the
|
||||
default drawing element is a tile, drawing functions will be passed
|
||||
parameters in terms of number of tiles instead of number of pixels.
|
||||
For example, to draw a single character, instead of using bitmaps,
|
||||
an index to an array of bitmaps will be used. To clear or move a
|
||||
rectangular section of a screen, the rectangle will be described in
|
||||
terms of number of tiles in the x- and y-axis.
|
||||
|
||||
This is particularly important to one driver, matroxfb. If
|
||||
unsure, say N.
|
||||
|
||||
comment "Frame buffer hardware drivers"
|
||||
depends on FB
|
||||
|
||||
config FB_GRVGA
|
||||
tristate "Aeroflex Gaisler framebuffer support"
|
||||
depends on FB && SPARC
|
||||
@ -2223,3 +2044,5 @@ config FB_SM712
|
||||
source "drivers/video/fbdev/omap/Kconfig"
|
||||
source "drivers/video/fbdev/omap2/Kconfig"
|
||||
source "drivers/video/fbdev/mmp/Kconfig"
|
||||
|
||||
source "drivers/video/fbdev/core/Kconfig"
|
||||
|
@ -694,7 +694,7 @@ static void acornfb_init_fbinfo(void)
|
||||
first = 0;
|
||||
|
||||
fb_info.fbops = &acornfb_ops;
|
||||
fb_info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
|
||||
fb_info.flags = FBINFO_HWACCEL_YPAN;
|
||||
fb_info.pseudo_palette = current_par.pseudo_palette;
|
||||
|
||||
strcpy(fb_info.fix.id, "Acorn");
|
||||
|
@ -461,7 +461,6 @@ static int clcdfb_register(struct clcd_fb *fb)
|
||||
}
|
||||
|
||||
fb->fb.fbops = &clcdfb_ops;
|
||||
fb->fb.flags = FBINFO_FLAG_DEFAULT;
|
||||
fb->fb.pseudo_palette = fb->cmap;
|
||||
|
||||
strncpy(fb->fb.fix.id, clcd_name, sizeof(fb->fb.fix.id));
|
||||
|
@ -2427,7 +2427,7 @@ static int amifb_set_par(struct fb_info *info)
|
||||
info->fix.ywrapstep = 1;
|
||||
info->fix.xpanstep = 0;
|
||||
info->fix.ypanstep = 0;
|
||||
info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YWRAP |
|
||||
info->flags = FBINFO_HWACCEL_YWRAP |
|
||||
FBINFO_READS_FAST; /* override SCROLL_REDRAW */
|
||||
} else {
|
||||
info->fix.ywrapstep = 0;
|
||||
@ -2436,7 +2436,7 @@ static int amifb_set_par(struct fb_info *info)
|
||||
else
|
||||
info->fix.xpanstep = 16 << maxfmode;
|
||||
info->fix.ypanstep = 1;
|
||||
info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
|
||||
info->flags = FBINFO_HWACCEL_YPAN;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -3660,7 +3660,6 @@ default_chipset:
|
||||
}
|
||||
|
||||
info->fbops = &amifb_ops;
|
||||
info->flags = FBINFO_DEFAULT;
|
||||
info->device = &pdev->dev;
|
||||
|
||||
if (!fb_find_mode(&info->var, info, mode_option, ami_modedb,
|
||||
|
@ -546,7 +546,6 @@ static int arcfb_probe(struct platform_device *dev)
|
||||
par->c2io_addr = c2io_addr;
|
||||
par->cslut[0] = 0x00;
|
||||
par->cslut[1] = 0x06;
|
||||
info->flags = FBINFO_FLAG_DEFAULT;
|
||||
spin_lock_init(&par->lock);
|
||||
if (irq) {
|
||||
par->irq = irq;
|
||||
|
@ -516,7 +516,6 @@ static int init_asiliant(struct fb_info *p, unsigned long addr)
|
||||
p->fix.smem_start = addr;
|
||||
p->var = asiliantfb_var;
|
||||
p->fbops = &asiliantfb_ops;
|
||||
p->flags = FBINFO_DEFAULT;
|
||||
|
||||
err = fb_alloc_cmap(&p->cmap, 256, 0);
|
||||
if (err) {
|
||||
|
@ -3112,7 +3112,6 @@ static int __init atafb_probe(struct platform_device *pdev)
|
||||
#ifdef ATAFB_FALCON
|
||||
fb_info.pseudo_palette = current_par.hw.falcon.pseudo_palette;
|
||||
#endif
|
||||
fb_info.flags = FBINFO_FLAG_DEFAULT;
|
||||
|
||||
if (!fb_find_mode(&fb_info.var, &fb_info, mode_option, atafb_modedb,
|
||||
NUM_TOTAL_MODES, &atafb_modedb[defmode],
|
||||
|
@ -1059,7 +1059,7 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev)
|
||||
if (IS_ERR(sinfo->reg_lcd))
|
||||
sinfo->reg_lcd = NULL;
|
||||
|
||||
info->flags = FBINFO_DEFAULT | FBINFO_PARTIAL_PAN_OK |
|
||||
info->flags = FBINFO_PARTIAL_PAN_OK |
|
||||
FBINFO_HWACCEL_YPAN;
|
||||
info->pseudo_palette = sinfo->pseudo_palette;
|
||||
info->fbops = &atmel_lcdfb_ops;
|
||||
|
@ -1927,7 +1927,6 @@ static int aty128_init(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
|
||||
/* fill in info */
|
||||
info->fbops = &aty128fb_ops;
|
||||
info->flags = FBINFO_FLAG_DEFAULT;
|
||||
|
||||
par->lcd_on = default_lcd_on;
|
||||
par->crt_on = default_crt_on;
|
||||
|
@ -2637,8 +2637,7 @@ static int aty_init(struct fb_info *info)
|
||||
|
||||
info->fbops = &atyfb_ops;
|
||||
info->pseudo_palette = par->pseudo_palette;
|
||||
info->flags = FBINFO_DEFAULT |
|
||||
FBINFO_HWACCEL_IMAGEBLIT |
|
||||
info->flags = FBINFO_HWACCEL_IMAGEBLIT |
|
||||
FBINFO_HWACCEL_FILLRECT |
|
||||
FBINFO_HWACCEL_COPYAREA |
|
||||
FBINFO_HWACCEL_YPAN |
|
||||
|
@ -1972,8 +1972,7 @@ static int radeon_set_fbinfo(struct radeonfb_info *rinfo)
|
||||
|
||||
info->par = rinfo;
|
||||
info->pseudo_palette = rinfo->pseudo_palette;
|
||||
info->flags = FBINFO_DEFAULT
|
||||
| FBINFO_HWACCEL_COPYAREA
|
||||
info->flags = FBINFO_HWACCEL_COPYAREA
|
||||
| FBINFO_HWACCEL_FILLRECT
|
||||
| FBINFO_HWACCEL_XPAN
|
||||
| FBINFO_HWACCEL_YPAN;
|
||||
|
@ -1069,7 +1069,7 @@ static int broadsheetfb_probe(struct platform_device *dev)
|
||||
|
||||
mutex_init(&par->io_lock);
|
||||
|
||||
info->flags = FBINFO_FLAG_DEFAULT | FBINFO_VIRTFB;
|
||||
info->flags = FBINFO_VIRTFB;
|
||||
|
||||
info->fbdefio = &broadsheetfb_defio;
|
||||
fb_deferred_io_init(info);
|
||||
|
@ -314,7 +314,6 @@ static int bw2_probe(struct platform_device *op)
|
||||
|
||||
info->fix.smem_len = PAGE_ALIGN(linebytes * info->var.yres);
|
||||
|
||||
info->flags = FBINFO_DEFAULT;
|
||||
info->fbops = &bw2_ops;
|
||||
|
||||
info->screen_base = of_ioremap(&op->resource[0], 0,
|
||||
|
@ -561,7 +561,6 @@ static int alloc_carmine_fb(void __iomem *regs, void __iomem *smem_base,
|
||||
|
||||
info->fix = carminefb_fix;
|
||||
info->pseudo_palette = par->pseudo_palette;
|
||||
info->flags = FBINFO_DEFAULT;
|
||||
|
||||
ret = fb_alloc_cmap(&info->cmap, 256, 1);
|
||||
if (ret < 0)
|
||||
|
@ -533,7 +533,7 @@ static int cg14_probe(struct platform_device *op)
|
||||
par->mode = MDI_8_PIX;
|
||||
par->ramsize = (is_8mb ? 0x800000 : 0x400000);
|
||||
|
||||
info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
|
||||
info->flags = FBINFO_HWACCEL_YPAN;
|
||||
info->fbops = &cg14_ops;
|
||||
|
||||
__cg14_reset(par);
|
||||
|
@ -384,7 +384,6 @@ static int cg3_probe(struct platform_device *op)
|
||||
if (!par->regs)
|
||||
goto out_release_fb;
|
||||
|
||||
info->flags = FBINFO_DEFAULT;
|
||||
info->fbops = &cg3_ops;
|
||||
info->screen_base = of_ioremap(&op->resource[0], CG3_RAM_OFFSET,
|
||||
info->fix.smem_len, "cg3 ram");
|
||||
|
@ -782,7 +782,7 @@ static int cg6_probe(struct platform_device *op)
|
||||
par->fhc = of_ioremap(&op->resource[0], CG6_FHC_OFFSET,
|
||||
sizeof(u32), "cgsix fhc");
|
||||
|
||||
info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_IMAGEBLIT |
|
||||
info->flags = FBINFO_HWACCEL_IMAGEBLIT |
|
||||
FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT |
|
||||
FBINFO_READS_FAST;
|
||||
info->fbops = &cg6_ops;
|
||||
|
@ -340,7 +340,6 @@ static void init_chips(struct fb_info *p, unsigned long addr)
|
||||
p->var = chipsfb_var;
|
||||
|
||||
p->fbops = &chipsfb_ops;
|
||||
p->flags = FBINFO_DEFAULT;
|
||||
|
||||
fb_alloc_cmap(&p->cmap, 256, 0);
|
||||
|
||||
|
@ -1978,8 +1978,7 @@ static int cirrusfb_set_fbinfo(struct fb_info *info)
|
||||
struct fb_var_screeninfo *var = &info->var;
|
||||
|
||||
info->pseudo_palette = cinfo->pseudo_palette;
|
||||
info->flags = FBINFO_DEFAULT
|
||||
| FBINFO_HWACCEL_XPAN
|
||||
info->flags = FBINFO_HWACCEL_XPAN
|
||||
| FBINFO_HWACCEL_YPAN
|
||||
| FBINFO_HWACCEL_FILLRECT
|
||||
| FBINFO_HWACCEL_IMAGEBLIT
|
||||
|
@ -310,7 +310,6 @@ static int clps711x_fb_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
info->fbops = &clps711x_fb_ops;
|
||||
info->flags = FBINFO_DEFAULT;
|
||||
info->var.activate = FB_ACTIVATE_FORCE | FB_ACTIVATE_NOW;
|
||||
info->var.height = -1;
|
||||
info->var.width = -1;
|
||||
|
@ -313,7 +313,6 @@ static int cobalt_lcdfb_probe(struct platform_device *dev)
|
||||
info->fix.smem_len = info->screen_size;
|
||||
info->pseudo_palette = NULL;
|
||||
info->par = NULL;
|
||||
info->flags = FBINFO_DEFAULT;
|
||||
|
||||
retval = register_framebuffer(info);
|
||||
if (retval < 0) {
|
||||
|
@ -775,7 +775,7 @@ static void __init control_init_info(struct fb_info *info, struct fb_info_contro
|
||||
info->par = &p->par;
|
||||
info->fbops = &controlfb_ops;
|
||||
info->pseudo_palette = p->pseudo_palette;
|
||||
info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
|
||||
info->flags = FBINFO_HWACCEL_YPAN;
|
||||
info->screen_base = p->frame_buffer + CTRLFB_OFF;
|
||||
|
||||
fb_alloc_cmap(&info->cmap, 256, 0);
|
||||
|
198
drivers/video/fbdev/core/Kconfig
Normal file
198
drivers/video/fbdev/core/Kconfig
Normal file
@ -0,0 +1,198 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# fbdev core configuration
|
||||
#
|
||||
|
||||
config FB_CORE
|
||||
select VIDEO_CMDLINE
|
||||
tristate
|
||||
|
||||
config FB_NOTIFY
|
||||
bool
|
||||
|
||||
config FIRMWARE_EDID
|
||||
bool "Enable firmware EDID"
|
||||
depends on FB
|
||||
help
|
||||
This enables access to the EDID transferred from the firmware.
|
||||
On the i386, this is from the Video BIOS. Enable this if DDC/I2C
|
||||
transfers do not work for your driver and if you are using
|
||||
nvidiafb, i810fb or savagefb.
|
||||
|
||||
In general, choosing Y for this option is safe. If you
|
||||
experience extremely long delays while booting before you get
|
||||
something on your display, try setting this to N. Matrox cards in
|
||||
combination with certain motherboards and monitors are known to
|
||||
suffer from this problem.
|
||||
|
||||
config FB_DEVICE
|
||||
bool "Provide legacy /dev/fb* device"
|
||||
depends on FB_CORE
|
||||
default y
|
||||
help
|
||||
Say Y here if you want the legacy /dev/fb* device file and
|
||||
interfaces within sysfs anc procfs. It is only required if you
|
||||
have userspace programs that depend on fbdev for graphics output.
|
||||
This does not affect the framebuffer console. If unsure, say N.
|
||||
|
||||
config FB_DDC
|
||||
tristate
|
||||
depends on FB
|
||||
select I2C_ALGOBIT
|
||||
select I2C
|
||||
|
||||
config FB_CFB_FILLRECT
|
||||
tristate
|
||||
depends on FB_CORE
|
||||
help
|
||||
Include the cfb_fillrect function for generic software rectangle
|
||||
filling. This is used by drivers that don't provide their own
|
||||
(accelerated) version.
|
||||
|
||||
config FB_CFB_COPYAREA
|
||||
tristate
|
||||
depends on FB_CORE
|
||||
help
|
||||
Include the cfb_copyarea function for generic software area copying.
|
||||
This is used by drivers that don't provide their own (accelerated)
|
||||
version.
|
||||
|
||||
config FB_CFB_IMAGEBLIT
|
||||
tristate
|
||||
depends on FB_CORE
|
||||
help
|
||||
Include the cfb_imageblit function for generic software image
|
||||
blitting. This is used by drivers that don't provide their own
|
||||
(accelerated) version.
|
||||
|
||||
config FB_CFB_REV_PIXELS_IN_BYTE
|
||||
bool
|
||||
depends on FB_CORE
|
||||
help
|
||||
Allow generic frame-buffer functions to work on displays with 1, 2
|
||||
and 4 bits per pixel depths which has opposite order of pixels in
|
||||
byte order to bytes in long order.
|
||||
|
||||
config FB_SYS_FILLRECT
|
||||
tristate
|
||||
depends on FB_CORE
|
||||
help
|
||||
Include the sys_fillrect function for generic software rectangle
|
||||
filling. This is used by drivers that don't provide their own
|
||||
(accelerated) version and the framebuffer is in system RAM.
|
||||
|
||||
config FB_SYS_COPYAREA
|
||||
tristate
|
||||
depends on FB_CORE
|
||||
help
|
||||
Include the sys_copyarea function for generic software area copying.
|
||||
This is used by drivers that don't provide their own (accelerated)
|
||||
version and the framebuffer is in system RAM.
|
||||
|
||||
config FB_SYS_IMAGEBLIT
|
||||
tristate
|
||||
depends on FB_CORE
|
||||
help
|
||||
Include the sys_imageblit function for generic software image
|
||||
blitting. This is used by drivers that don't provide their own
|
||||
(accelerated) version and the framebuffer is in system RAM.
|
||||
|
||||
config FB_PROVIDE_GET_FB_UNMAPPED_AREA
|
||||
bool
|
||||
depends on FB
|
||||
help
|
||||
Allow generic frame-buffer to provide get_fb_unmapped_area
|
||||
function to provide shareable character device support on nommu.
|
||||
|
||||
menuconfig FB_FOREIGN_ENDIAN
|
||||
bool "Framebuffer foreign endianness support"
|
||||
depends on FB
|
||||
help
|
||||
This menu will let you enable support for the framebuffers with
|
||||
non-native endianness (e.g. Little-Endian framebuffer on a
|
||||
Big-Endian machine). Most probably you don't have such hardware,
|
||||
so it's safe to say "n" here.
|
||||
|
||||
choice
|
||||
prompt "Choice endianness support"
|
||||
depends on FB_FOREIGN_ENDIAN
|
||||
|
||||
config FB_BOTH_ENDIAN
|
||||
bool "Support for Big- and Little-Endian framebuffers"
|
||||
|
||||
config FB_BIG_ENDIAN
|
||||
bool "Support for Big-Endian framebuffers only"
|
||||
|
||||
config FB_LITTLE_ENDIAN
|
||||
bool "Support for Little-Endian framebuffers only"
|
||||
|
||||
endchoice
|
||||
|
||||
config FB_SYS_FOPS
|
||||
tristate
|
||||
depends on FB_CORE
|
||||
|
||||
config FB_DEFERRED_IO
|
||||
bool
|
||||
depends on FB_CORE
|
||||
|
||||
config FB_DMA_HELPERS
|
||||
bool
|
||||
depends on FB_CORE
|
||||
select FB_SYS_COPYAREA
|
||||
select FB_SYS_FILLRECT
|
||||
select FB_SYS_FOPS
|
||||
select FB_SYS_IMAGEBLIT
|
||||
|
||||
config FB_IO_HELPERS
|
||||
bool
|
||||
depends on FB_CORE
|
||||
select FB_CFB_COPYAREA
|
||||
select FB_CFB_FILLRECT
|
||||
select FB_CFB_IMAGEBLIT
|
||||
|
||||
config FB_SYS_HELPERS
|
||||
bool
|
||||
depends on FB_CORE
|
||||
select FB_SYS_COPYAREA
|
||||
select FB_SYS_FILLRECT
|
||||
select FB_SYS_FOPS
|
||||
select FB_SYS_IMAGEBLIT
|
||||
|
||||
config FB_SYS_HELPERS_DEFERRED
|
||||
bool
|
||||
depends on FB_CORE
|
||||
select FB_DEFERRED_IO
|
||||
select FB_SYS_HELPERS
|
||||
|
||||
config FB_BACKLIGHT
|
||||
tristate
|
||||
depends on FB
|
||||
select BACKLIGHT_CLASS_DEVICE
|
||||
|
||||
config FB_MODE_HELPERS
|
||||
bool "Enable Video Mode Handling Helpers"
|
||||
depends on FB
|
||||
help
|
||||
This enables functions for handling video modes using the
|
||||
Generalized Timing Formula and the EDID parser. A few drivers rely
|
||||
on this feature such as the radeonfb, rivafb, and the i810fb. If
|
||||
your driver does not take advantage of this feature, choosing Y will
|
||||
just increase the kernel size by about 5K.
|
||||
|
||||
config FB_TILEBLITTING
|
||||
bool "Enable Tile Blitting Support"
|
||||
depends on FB
|
||||
help
|
||||
This enables tile blitting. Tile blitting is a drawing technique
|
||||
where the screen is divided into rectangular sections (tiles), whereas
|
||||
the standard blitting divides the screen into pixels. Because the
|
||||
default drawing element is a tile, drawing functions will be passed
|
||||
parameters in terms of number of tiles instead of number of pixels.
|
||||
For example, to draw a single character, instead of using bitmaps,
|
||||
an index to an array of bitmaps will be used. To clear or move a
|
||||
rectangular section of a screen, the rectangle will be described in
|
||||
terms of number of tiles in the x- and y-axis.
|
||||
|
||||
This is particularly important to one driver, matroxfb. If
|
||||
unsure, say N.
|
@ -1,10 +1,12 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
obj-$(CONFIG_FB_NOTIFY) += fb_notify.o
|
||||
obj-$(CONFIG_FB) += fb.o
|
||||
fb-y := fb_backlight.o \
|
||||
fb_info.o \
|
||||
fbmem.o fbmon.o fbcmap.o \
|
||||
obj-$(CONFIG_FB_CORE) += fb.o
|
||||
fb-y := fb_info.o \
|
||||
fbmem.o fbcmap.o \
|
||||
modedb.o fbcvt.o fb_cmdline.o fb_io_fops.o
|
||||
ifdef CONFIG_FB
|
||||
fb-y += fb_backlight.o fbmon.o
|
||||
endif
|
||||
fb-$(CONFIG_FB_DEFERRED_IO) += fb_defio.o
|
||||
fb-$(CONFIG_FB_DEVICE) += fb_chrdev.o \
|
||||
fb_procfs.o \
|
||||
|
@ -13,7 +13,8 @@
|
||||
*
|
||||
* Creates a new frame buffer info structure. Also reserves @size bytes
|
||||
* for driver private data (info->par). info->par (if any) will be
|
||||
* aligned to sizeof(long).
|
||||
* aligned to sizeof(long). The new instances of struct fb_info and
|
||||
* the driver private data are both cleared to zero.
|
||||
*
|
||||
* Returns the new structure, or NULL if an error occurred.
|
||||
*
|
||||
|
@ -1459,7 +1459,7 @@ static struct cfb_info *cyberpro_alloc_fb_info(unsigned int id, char *name)
|
||||
cfb->fb.var.accel_flags = FB_ACCELF_TEXT;
|
||||
|
||||
cfb->fb.fbops = &cyber2000fb_ops;
|
||||
cfb->fb.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
|
||||
cfb->fb.flags = FBINFO_HWACCEL_YPAN;
|
||||
cfb->fb.pseudo_palette = cfb->pseudo_palette;
|
||||
|
||||
spin_lock_init(&cfb->reg_b0_lock);
|
||||
|
@ -1463,7 +1463,6 @@ static int fb_probe(struct platform_device *device)
|
||||
da8xx_fb_var.bits_per_pixel = lcd_cfg->bpp;
|
||||
|
||||
/* Initialize fbinfo */
|
||||
da8xx_fb_info->flags = FBINFO_FLAG_DEFAULT;
|
||||
da8xx_fb_info->fix = da8xx_fb_fix;
|
||||
da8xx_fb_info->var = da8xx_fb_var;
|
||||
da8xx_fb_info->fbops = &da8xx_fb_ops;
|
||||
|
@ -555,7 +555,6 @@ static int efifb_probe(struct platform_device *dev)
|
||||
info->fbops = &efifb_ops;
|
||||
info->var = efifb_defined;
|
||||
info->fix = efifb_fix;
|
||||
info->flags = FBINFO_FLAG_DEFAULT;
|
||||
|
||||
orientation = drm_get_panel_orientation_quirk(efifb_defined.xres,
|
||||
efifb_defined.yres);
|
||||
|
@ -515,7 +515,6 @@ static int ep93xxfb_probe(struct platform_device *pdev)
|
||||
info->fix.accel = FB_ACCEL_NONE;
|
||||
info->var.activate = FB_ACTIVATE_NOW;
|
||||
info->var.vmode = FB_VMODE_NONINTERLACED;
|
||||
info->flags = FBINFO_DEFAULT;
|
||||
info->node = -1;
|
||||
info->state = FBINFO_STATE_RUNNING;
|
||||
info->pseudo_palette = &fbi->pseudo_palette;
|
||||
|
@ -929,8 +929,7 @@ static int ffb_probe(struct platform_device *op)
|
||||
/* Don't mention copyarea, so SCROLL_REDRAW is always
|
||||
* used. It is the fastest on this chip.
|
||||
*/
|
||||
info->flags = (FBINFO_DEFAULT |
|
||||
/* FBINFO_HWACCEL_COPYAREA | */
|
||||
info->flags = (/* FBINFO_HWACCEL_COPYAREA | */
|
||||
FBINFO_HWACCEL_FILLRECT |
|
||||
FBINFO_HWACCEL_IMAGEBLIT);
|
||||
|
||||
|
@ -280,7 +280,6 @@ static int fm2fb_probe(struct zorro_dev *z, const struct zorro_device_id *id)
|
||||
info->pseudo_palette = info->par;
|
||||
info->par = NULL;
|
||||
info->fix = fb_fix;
|
||||
info->flags = FBINFO_DEFAULT;
|
||||
|
||||
if (register_framebuffer(info) < 0) {
|
||||
fb_dealloc_cmap(&info->cmap);
|
||||
|
@ -1476,7 +1476,7 @@ static int install_fb(struct fb_info *info)
|
||||
|
||||
info->var.activate = FB_ACTIVATE_NOW;
|
||||
info->fbops = &fsl_diu_ops;
|
||||
info->flags = FBINFO_DEFAULT | FBINFO_VIRTFB | FBINFO_PARTIAL_PAN_OK |
|
||||
info->flags = FBINFO_VIRTFB | FBINFO_PARTIAL_PAN_OK |
|
||||
FBINFO_READS_FAST;
|
||||
info->pseudo_palette = mfbi->pseudo_palette;
|
||||
|
||||
|
@ -219,7 +219,7 @@ int __init g364fb_init(void)
|
||||
fb_info.screen_base = (char *) G364_MEM_BASE; /* virtual kernel address */
|
||||
fb_info.var = fb_var;
|
||||
fb_info.fix = fb_fix;
|
||||
fb_info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
|
||||
fb_info.flags = FBINFO_HWACCEL_YPAN;
|
||||
|
||||
fb_alloc_cmap(&fb_info.cmap, 255, 0);
|
||||
|
||||
|
@ -1194,7 +1194,6 @@ static int gbefb_probe(struct platform_device *p_dev)
|
||||
|
||||
info->fbops = &gbefb_ops;
|
||||
info->pseudo_palette = pseudo_palette;
|
||||
info->flags = FBINFO_DEFAULT;
|
||||
info->screen_base = gbe_mem;
|
||||
fb_alloc_cmap(&info->cmap, 256, 0);
|
||||
|
||||
|
@ -294,7 +294,6 @@ static struct fb_info *gx1fb_init_fbinfo(struct device *dev)
|
||||
info->var.vmode = FB_VMODE_NONINTERLACED;
|
||||
|
||||
info->fbops = &gx1fb_ops;
|
||||
info->flags = FBINFO_DEFAULT;
|
||||
info->node = -1;
|
||||
|
||||
info->pseudo_palette = (void *)par + sizeof(struct geodefb_par);
|
||||
|
@ -308,7 +308,6 @@ static struct fb_info *gxfb_init_fbinfo(struct device *dev)
|
||||
info->var.vmode = FB_VMODE_NONINTERLACED;
|
||||
|
||||
info->fbops = &gxfb_ops;
|
||||
info->flags = FBINFO_DEFAULT;
|
||||
info->node = -1;
|
||||
|
||||
info->pseudo_palette = (void *)par + sizeof(struct gxfb_par);
|
||||
|
@ -432,7 +432,6 @@ static struct fb_info *lxfb_init_fbinfo(struct device *dev)
|
||||
info->var.vmode = FB_VMODE_NONINTERLACED;
|
||||
|
||||
info->fbops = &lxfb_ops;
|
||||
info->flags = FBINFO_DEFAULT;
|
||||
info->node = -1;
|
||||
|
||||
info->pseudo_palette = (void *)par + sizeof(struct lxfb_par);
|
||||
|
@ -212,7 +212,6 @@ static int goldfish_fb_probe(struct platform_device *pdev)
|
||||
height = readl(fb->reg_base + FB_GET_HEIGHT);
|
||||
|
||||
fb->fb.fbops = &goldfish_fb_ops;
|
||||
fb->fb.flags = FBINFO_FLAG_DEFAULT;
|
||||
fb->fb.pseudo_palette = fb->cmap;
|
||||
fb->fb.fix.type = FB_TYPE_PACKED_PIXELS;
|
||||
fb->fb.fix.visual = FB_VISUAL_TRUECOLOR;
|
||||
|
@ -377,7 +377,7 @@ static int grvga_probe(struct platform_device *dev)
|
||||
info->fbops = &grvga_ops;
|
||||
info->fix = grvga_fix;
|
||||
info->pseudo_palette = par->color_palette;
|
||||
info->flags = FBINFO_DEFAULT | FBINFO_PARTIAL_PAN_OK | FBINFO_HWACCEL_YPAN;
|
||||
info->flags = FBINFO_PARTIAL_PAN_OK | FBINFO_HWACCEL_YPAN;
|
||||
info->fix.smem_len = grvga_mem_size;
|
||||
|
||||
if (!devm_request_mem_region(&dev->dev, dev->resource[0].start,
|
||||
|
@ -690,8 +690,7 @@ static int gxt4500_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
#endif
|
||||
|
||||
info->fbops = &gxt4500_ops;
|
||||
info->flags = FBINFO_FLAG_DEFAULT | FBINFO_HWACCEL_XPAN |
|
||||
FBINFO_HWACCEL_YPAN;
|
||||
info->flags = FBINFO_HWACCEL_XPAN | FBINFO_HWACCEL_YPAN;
|
||||
|
||||
err = fb_alloc_cmap(&info->cmap, 256, 0);
|
||||
if (err) {
|
||||
|
@ -189,7 +189,7 @@ static int hecubafb_probe(struct platform_device *dev)
|
||||
par->send_command = apollo_send_command;
|
||||
par->send_data = apollo_send_data;
|
||||
|
||||
info->flags = FBINFO_FLAG_DEFAULT | FBINFO_VIRTFB;
|
||||
info->flags = FBINFO_VIRTFB;
|
||||
|
||||
info->fbdefio = &hecubafb_defio;
|
||||
fb_deferred_io_init(info);
|
||||
|
@ -573,7 +573,7 @@ static int hgafb_probe(struct platform_device *pdev)
|
||||
hga_fix.smem_start = (unsigned long)hga_vram;
|
||||
hga_fix.smem_len = hga_vram_len;
|
||||
|
||||
info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
|
||||
info->flags = FBINFO_HWACCEL_YPAN;
|
||||
info->var = hga_default_var;
|
||||
info->fix = hga_fix;
|
||||
info->monspecs.hfmin = 0;
|
||||
|
@ -405,7 +405,7 @@ static int hitfb_probe(struct platform_device *dev)
|
||||
info->var = hitfb_var;
|
||||
info->fix = hitfb_fix;
|
||||
info->pseudo_palette = info->par;
|
||||
info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN |
|
||||
info->flags = FBINFO_HWACCEL_YPAN |
|
||||
FBINFO_HWACCEL_FILLRECT | FBINFO_HWACCEL_COPYAREA;
|
||||
|
||||
info->screen_base = (char __iomem *)(uintptr_t)hitfb_fix.smem_start;
|
||||
|
@ -287,7 +287,6 @@ static int hpfb_init_one(unsigned long phys_base, unsigned long virt_base)
|
||||
else
|
||||
strcat(fb_info.fix.id, "Catseye");
|
||||
fb_info.fbops = &hpfb_ops;
|
||||
fb_info.flags = FBINFO_DEFAULT;
|
||||
fb_info.var = hpfb_defined;
|
||||
fb_info.screen_base = (char *)fb_start;
|
||||
|
||||
|
@ -1159,8 +1159,6 @@ static int hvfb_probe(struct hv_device *hdev,
|
||||
}
|
||||
|
||||
/* Set up fb_info */
|
||||
info->flags = FBINFO_DEFAULT;
|
||||
|
||||
info->var.xres_virtual = info->var.xres = screen_width;
|
||||
info->var.yres_virtual = info->var.yres = screen_height;
|
||||
info->var.bits_per_pixel = screen_depth;
|
||||
|
@ -1077,7 +1077,7 @@ static int i740fb_probe(struct pci_dev *dev, const struct pci_device_id *ent)
|
||||
info->fix.mmio_len = pci_resource_len(dev, 1);
|
||||
info->fix.smem_start = pci_resource_start(dev, 0);
|
||||
info->fix.smem_len = info->screen_size;
|
||||
info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
|
||||
info->flags = FBINFO_HWACCEL_YPAN;
|
||||
|
||||
if (i740fb_setup_ddc_bus(info) == 0) {
|
||||
par->ddc_registered = true;
|
||||
|
@ -1442,13 +1442,13 @@ static int i810fb_set_par(struct fb_info *info)
|
||||
encode_fix(&info->fix, info);
|
||||
|
||||
if (info->var.accel_flags && !(par->dev_flags & LOCKUP)) {
|
||||
info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN |
|
||||
info->flags = FBINFO_HWACCEL_YPAN |
|
||||
FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT |
|
||||
FBINFO_HWACCEL_IMAGEBLIT;
|
||||
info->pixmap.scan_align = 2;
|
||||
} else {
|
||||
info->pixmap.scan_align = 1;
|
||||
info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
|
||||
info->flags = FBINFO_HWACCEL_YPAN;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -1447,8 +1447,7 @@ static int init_imstt(struct fb_info *info)
|
||||
info->var.pixclock = 1000000 / getclkMHz(par);
|
||||
|
||||
info->fbops = &imsttfb_ops;
|
||||
info->flags = FBINFO_DEFAULT |
|
||||
FBINFO_HWACCEL_COPYAREA |
|
||||
info->flags = FBINFO_HWACCEL_COPYAREA |
|
||||
FBINFO_HWACCEL_FILLRECT |
|
||||
FBINFO_HWACCEL_YPAN;
|
||||
|
||||
|
@ -698,8 +698,7 @@ static int imxfb_init_fbinfo(struct platform_device *pdev)
|
||||
info->var.vmode = FB_VMODE_NONINTERLACED;
|
||||
|
||||
info->fbops = &imxfb_ops;
|
||||
info->flags = FBINFO_FLAG_DEFAULT |
|
||||
FBINFO_READS_FAST;
|
||||
info->flags = FBINFO_READS_FAST;
|
||||
|
||||
np = pdev->dev.of_node;
|
||||
info->var.grayscale = of_property_read_bool(np,
|
||||
|
@ -1098,7 +1098,6 @@ static int intelfb_set_fbinfo(struct intelfb_info *dinfo)
|
||||
|
||||
DBG_MSG("intelfb_set_fbinfo\n");
|
||||
|
||||
info->flags = FBINFO_FLAG_DEFAULT;
|
||||
info->fbops = &intel_fb_ops;
|
||||
info->pseudo_palette = dinfo->pseudo_palette;
|
||||
|
||||
@ -1372,11 +1371,11 @@ static int intelfb_set_par(struct fb_info *info)
|
||||
intelfb_blank(FB_BLANK_UNBLANK, info);
|
||||
|
||||
if (ACCEL(dinfo, info)) {
|
||||
info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN |
|
||||
info->flags = FBINFO_HWACCEL_YPAN |
|
||||
FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT |
|
||||
FBINFO_HWACCEL_IMAGEBLIT;
|
||||
} else
|
||||
info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
|
||||
info->flags = FBINFO_HWACCEL_YPAN;
|
||||
|
||||
kfree(hw);
|
||||
return 0;
|
||||
|
@ -716,7 +716,6 @@ static int kyrofb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
info->fbops = &kyrofb_ops;
|
||||
info->fix = kyro_fix;
|
||||
info->pseudo_palette = currentpar->palette;
|
||||
info->flags = FBINFO_DEFAULT;
|
||||
|
||||
SetCoreClockPLL(deviceInfo.pSTGReg, pdev);
|
||||
|
||||
|
@ -600,7 +600,6 @@ static int leo_probe(struct platform_device *op)
|
||||
!info->screen_base)
|
||||
goto out_unmap_regs;
|
||||
|
||||
info->flags = FBINFO_DEFAULT;
|
||||
info->fbops = &leo_ops;
|
||||
info->pseudo_palette = par->clut_data;
|
||||
|
||||
|
@ -876,7 +876,6 @@ static int __init macfb_init(void)
|
||||
fb_info.var = macfb_defined;
|
||||
fb_info.fix = macfb_fix;
|
||||
fb_info.pseudo_palette = pseudo_palette;
|
||||
fb_info.flags = FBINFO_DEFAULT;
|
||||
|
||||
err = fb_alloc_cmap(&fb_info.cmap, video_cmap_len, 0);
|
||||
if (err)
|
||||
|
@ -603,9 +603,8 @@ static int matroxfb_dh_regit(const struct matrox_fb_info *minfo,
|
||||
void* oldcrtc2;
|
||||
|
||||
m2info->fbcon.fbops = &matroxfb_dh_ops;
|
||||
m2info->fbcon.flags = FBINFO_FLAG_DEFAULT;
|
||||
m2info->fbcon.flags |= FBINFO_HWACCEL_XPAN |
|
||||
FBINFO_HWACCEL_YPAN;
|
||||
m2info->fbcon.flags = FBINFO_HWACCEL_XPAN |
|
||||
FBINFO_HWACCEL_YPAN;
|
||||
m2info->fbcon.pseudo_palette = m2info->cmap;
|
||||
fb_alloc_cmap(&m2info->fbcon.cmap, 256, 1);
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user