Commit 9ab073bc authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'fbdev-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux

Pull fbdev changes from Tomi Valkeinen:
 - Improvements to da8xx-fb to make it support v2 of the LCDC IP, used
   eg in BeagleBone
 - Himax HX8369 controller support
 - Various small fixes and cleanups

* tag 'fbdev-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (42 commits)
  video: da8xx-fb: fix the polarities of the hsync/vsync pulse
  video: da8xx-fb: support lcdc v2 timing register expansion
  video: da8xx-fb: fixing timing off by one errors
  video: da8xx-fb fixing incorrect porch mappings
  video: xilinxfb: replace devm_request_and_ioremap by devm_ioremap_resource
  fbmem: move EXPORT_SYMBOL annotation next to symbol declarations
  drivers: video: fbcmap: remove the redundency and incorrect checkings
  video: mxsfb: simplify use of devm_ioremap_resource
  Release efifb's colormap in efifb_destroy()
  at91/avr32/atmel_lcdfb: prepare clk before calling enable
  video: exynos: Ensure definitions match prototypes
  OMAPDSS: fix WARN_ON in 'alpha_blending_enabled' sysfs file
  OMAPDSS: HDMI: Fix possible NULL reference
  video: da8xx-fb: adding am33xx as dependency
  video: da8xx-fb: let compiler decide what to inline
  video: da8xx-fb: make clock naming consistent
  video: da8xx-fb: set upstream clock rate (if reqd)
  video: da8xx-fb: reorganize panel detection
  video: da8xx-fb: ensure non-null cfg in pdata
  video: da8xx-fb: use devres
  ...
parents eced5a0a 028cd86b
...@@ -12,6 +12,7 @@ Required properties: ...@@ -12,6 +12,7 @@ Required properties:
- stride: The number of bytes in each line of the framebuffer. - stride: The number of bytes in each line of the framebuffer.
- format: The format of the framebuffer surface. Valid values are: - format: The format of the framebuffer surface. Valid values are:
- r5g6b5 (16-bit pixels, d[15:11]=r, d[10:5]=g, d[4:0]=b). - r5g6b5 (16-bit pixels, d[15:11]=r, d[10:5]=g, d[4:0]=b).
- a8b8g8r8 (32-bit pixels, d[31:24]=a, d[23:16]=b, d[15:8]=g, d[7:0]=r).
Example: Example:
......
...@@ -2100,13 +2100,6 @@ config GPM1040A0_320X240 ...@@ -2100,13 +2100,6 @@ config GPM1040A0_320X240
bool "Giantplus Technology GPM1040A0 320x240 Color TFT LCD" bool "Giantplus Technology GPM1040A0 320x240 Color TFT LCD"
depends on FB_NUC900 depends on FB_NUC900
config FB_NUC900_DEBUG
bool "NUC900 lcd debug messages"
depends on FB_NUC900
help
Turn on debugging messages. Note that you can set/unset at run time
through sysfs
config FB_SM501 config FB_SM501
tristate "Silicon Motion SM501 framebuffer support" tristate "Silicon Motion SM501 framebuffer support"
depends on FB && MFD_SM501 depends on FB && MFD_SM501
...@@ -2228,15 +2221,17 @@ config FB_SH7760 ...@@ -2228,15 +2221,17 @@ config FB_SH7760
panels <= 320 pixel horizontal resolution. panels <= 320 pixel horizontal resolution.
config FB_DA8XX config FB_DA8XX
tristate "DA8xx/OMAP-L1xx Framebuffer support" tristate "DA8xx/OMAP-L1xx/AM335x Framebuffer support"
depends on FB && ARCH_DAVINCI_DA8XX depends on FB && (ARCH_DAVINCI_DA8XX || SOC_AM33XX)
select FB_CFB_FILLRECT select FB_CFB_FILLRECT
select FB_CFB_COPYAREA select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT select FB_CFB_IMAGEBLIT
select FB_CFB_REV_PIXELS_IN_BYTE select FB_CFB_REV_PIXELS_IN_BYTE
select FB_MODE_HELPERS
select VIDEOMODE_HELPERS
---help--- ---help---
This is the frame buffer device driver for the TI LCD controller This is the frame buffer device driver for the TI LCD controller
found on DA8xx/OMAP-L1xx SoCs. found on DA8xx/OMAP-L1xx/AM335x SoCs.
If unsure, say N. If unsure, say N.
config FB_VIRTUAL config FB_VIRTUAL
......
...@@ -902,14 +902,14 @@ static int __init atmel_lcdfb_init_fbinfo(struct atmel_lcdfb_info *sinfo) ...@@ -902,14 +902,14 @@ static int __init atmel_lcdfb_init_fbinfo(struct atmel_lcdfb_info *sinfo)
static void atmel_lcdfb_start_clock(struct atmel_lcdfb_info *sinfo) static void atmel_lcdfb_start_clock(struct atmel_lcdfb_info *sinfo)
{ {
clk_enable(sinfo->bus_clk); clk_prepare_enable(sinfo->bus_clk);
clk_enable(sinfo->lcdc_clk); clk_prepare_enable(sinfo->lcdc_clk);
} }
static void atmel_lcdfb_stop_clock(struct atmel_lcdfb_info *sinfo) static void atmel_lcdfb_stop_clock(struct atmel_lcdfb_info *sinfo)
{ {
clk_disable(sinfo->bus_clk); clk_disable_unprepare(sinfo->bus_clk);
clk_disable(sinfo->lcdc_clk); clk_disable_unprepare(sinfo->lcdc_clk);
} }
......
...@@ -71,11 +71,24 @@ ...@@ -71,11 +71,24 @@
#define HX8357_SET_POWER_NORMAL 0xd2 #define HX8357_SET_POWER_NORMAL 0xd2
#define HX8357_SET_PANEL_RELATED 0xe9 #define HX8357_SET_PANEL_RELATED 0xe9
#define HX8369_SET_DISPLAY_BRIGHTNESS 0x51
#define HX8369_WRITE_CABC_DISPLAY_VALUE 0x53
#define HX8369_WRITE_CABC_BRIGHT_CTRL 0x55
#define HX8369_WRITE_CABC_MIN_BRIGHTNESS 0x5e
#define HX8369_SET_POWER 0xb1
#define HX8369_SET_DISPLAY_MODE 0xb2
#define HX8369_SET_DISPLAY_WAVEFORM_CYC 0xb4
#define HX8369_SET_VCOM 0xb6
#define HX8369_SET_EXTENSION_COMMAND 0xb9
#define HX8369_SET_GIP 0xd5
#define HX8369_SET_GAMMA_CURVE_RELATED 0xe0
struct hx8357_data { struct hx8357_data {
unsigned im_pins[HX8357_NUM_IM_PINS]; unsigned im_pins[HX8357_NUM_IM_PINS];
unsigned reset; unsigned reset;
struct spi_device *spi; struct spi_device *spi;
int state; int state;
bool use_im_pins;
}; };
static u8 hx8357_seq_power[] = { static u8 hx8357_seq_power[] = {
...@@ -143,6 +156,61 @@ static u8 hx8357_seq_display_mode[] = { ...@@ -143,6 +156,61 @@ static u8 hx8357_seq_display_mode[] = {
HX8357_SET_DISPLAY_MODE_RGB_INTERFACE, HX8357_SET_DISPLAY_MODE_RGB_INTERFACE,
}; };
static u8 hx8369_seq_write_CABC_min_brightness[] = {
HX8369_WRITE_CABC_MIN_BRIGHTNESS, 0x00,
};
static u8 hx8369_seq_write_CABC_control[] = {
HX8369_WRITE_CABC_DISPLAY_VALUE, 0x24,
};
static u8 hx8369_seq_set_display_brightness[] = {
HX8369_SET_DISPLAY_BRIGHTNESS, 0xFF,
};
static u8 hx8369_seq_write_CABC_control_setting[] = {
HX8369_WRITE_CABC_BRIGHT_CTRL, 0x02,
};
static u8 hx8369_seq_extension_command[] = {
HX8369_SET_EXTENSION_COMMAND, 0xff, 0x83, 0x69,
};
static u8 hx8369_seq_display_related[] = {
HX8369_SET_DISPLAY_MODE, 0x00, 0x2b, 0x03, 0x03, 0x70, 0x00,
0xff, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x01,
};
static u8 hx8369_seq_panel_waveform_cycle[] = {
HX8369_SET_DISPLAY_WAVEFORM_CYC, 0x0a, 0x1d, 0x80, 0x06, 0x02,
};
static u8 hx8369_seq_set_address_mode[] = {
HX8357_SET_ADDRESS_MODE, 0x00,
};
static u8 hx8369_seq_vcom[] = {
HX8369_SET_VCOM, 0x3e, 0x3e,
};
static u8 hx8369_seq_gip[] = {
HX8369_SET_GIP, 0x00, 0x01, 0x03, 0x25, 0x01, 0x02, 0x28, 0x70,
0x11, 0x13, 0x00, 0x00, 0x40, 0x26, 0x51, 0x37, 0x00, 0x00, 0x71,
0x35, 0x60, 0x24, 0x07, 0x0f, 0x04, 0x04,
};
static u8 hx8369_seq_power[] = {
HX8369_SET_POWER, 0x01, 0x00, 0x34, 0x03, 0x00, 0x11, 0x11, 0x32,
0x2f, 0x3f, 0x3f, 0x01, 0x3a, 0x01, 0xe6, 0xe6, 0xe6, 0xe6, 0xe6,
};
static u8 hx8369_seq_gamma_curve_related[] = {
HX8369_SET_GAMMA_CURVE_RELATED, 0x00, 0x0d, 0x19, 0x2f, 0x3b, 0x3d,
0x2e, 0x4a, 0x08, 0x0e, 0x0f, 0x14, 0x16, 0x14, 0x14, 0x14, 0x1e,
0x00, 0x0d, 0x19, 0x2f, 0x3b, 0x3d, 0x2e, 0x4a, 0x08, 0x0e, 0x0f,
0x14, 0x16, 0x14, 0x14, 0x14, 0x1e,
};
static int hx8357_spi_write_then_read(struct lcd_device *lcdev, static int hx8357_spi_write_then_read(struct lcd_device *lcdev,
u8 *txbuf, u16 txlen, u8 *txbuf, u16 txlen,
u8 *rxbuf, u16 rxlen) u8 *rxbuf, u16 rxlen)
...@@ -219,6 +287,10 @@ static int hx8357_enter_standby(struct lcd_device *lcdev) ...@@ -219,6 +287,10 @@ static int hx8357_enter_standby(struct lcd_device *lcdev)
if (ret < 0) if (ret < 0)
return ret; return ret;
/*
* The controller needs 120ms when entering in sleep mode before we can
* send the command to go off sleep mode
*/
msleep(120); msleep(120);
return 0; return 0;
...@@ -232,6 +304,10 @@ static int hx8357_exit_standby(struct lcd_device *lcdev) ...@@ -232,6 +304,10 @@ static int hx8357_exit_standby(struct lcd_device *lcdev)
if (ret < 0) if (ret < 0)
return ret; return ret;
/*
* The controller needs 120ms when exiting from sleep mode before we
* can send the command to enter in sleep mode
*/
msleep(120); msleep(120);
ret = hx8357_spi_write_byte(lcdev, HX8357_SET_DISPLAY_ON); ret = hx8357_spi_write_byte(lcdev, HX8357_SET_DISPLAY_ON);
...@@ -241,18 +317,9 @@ static int hx8357_exit_standby(struct lcd_device *lcdev) ...@@ -241,18 +317,9 @@ static int hx8357_exit_standby(struct lcd_device *lcdev)
return 0; return 0;
} }
static int hx8357_lcd_init(struct lcd_device *lcdev) static void hx8357_lcd_reset(struct lcd_device *lcdev)
{ {
struct hx8357_data *lcd = lcd_get_data(lcdev); struct hx8357_data *lcd = lcd_get_data(lcdev);
int ret;
/*
* Set the interface selection pins to SPI mode, with three
* wires
*/
gpio_set_value_cansleep(lcd->im_pins[0], 1);
gpio_set_value_cansleep(lcd->im_pins[1], 0);
gpio_set_value_cansleep(lcd->im_pins[2], 1);
/* Reset the screen */ /* Reset the screen */
gpio_set_value(lcd->reset, 1); gpio_set_value(lcd->reset, 1);
...@@ -260,7 +327,25 @@ static int hx8357_lcd_init(struct lcd_device *lcdev) ...@@ -260,7 +327,25 @@ static int hx8357_lcd_init(struct lcd_device *lcdev)
gpio_set_value(lcd->reset, 0); gpio_set_value(lcd->reset, 0);
usleep_range(10000, 12000); usleep_range(10000, 12000);
gpio_set_value(lcd->reset, 1); gpio_set_value(lcd->reset, 1);
/* The controller needs 120ms to recover from reset */
msleep(120); msleep(120);
}
static int hx8357_lcd_init(struct lcd_device *lcdev)
{
struct hx8357_data *lcd = lcd_get_data(lcdev);
int ret;
/*
* Set the interface selection pins to SPI mode, with three
* wires
*/
if (lcd->use_im_pins) {
gpio_set_value_cansleep(lcd->im_pins[0], 1);
gpio_set_value_cansleep(lcd->im_pins[1], 0);
gpio_set_value_cansleep(lcd->im_pins[2], 1);
}
ret = hx8357_spi_write_array(lcdev, hx8357_seq_power, ret = hx8357_spi_write_array(lcdev, hx8357_seq_power,
ARRAY_SIZE(hx8357_seq_power)); ARRAY_SIZE(hx8357_seq_power));
...@@ -341,6 +426,9 @@ static int hx8357_lcd_init(struct lcd_device *lcdev) ...@@ -341,6 +426,9 @@ static int hx8357_lcd_init(struct lcd_device *lcdev)
if (ret < 0) if (ret < 0)
return ret; return ret;
/*
* The controller needs 120ms to fully recover from exiting sleep mode
*/
msleep(120); msleep(120);
ret = hx8357_spi_write_byte(lcdev, HX8357_SET_DISPLAY_ON); ret = hx8357_spi_write_byte(lcdev, HX8357_SET_DISPLAY_ON);
...@@ -356,6 +444,96 @@ static int hx8357_lcd_init(struct lcd_device *lcdev) ...@@ -356,6 +444,96 @@ static int hx8357_lcd_init(struct lcd_device *lcdev)
return 0; return 0;
} }
static int hx8369_lcd_init(struct lcd_device *lcdev)
{
int ret;
ret = hx8357_spi_write_array(lcdev, hx8369_seq_extension_command,
ARRAY_SIZE(hx8369_seq_extension_command));
if (ret < 0)
return ret;
usleep_range(10000, 12000);
ret = hx8357_spi_write_array(lcdev, hx8369_seq_display_related,
ARRAY_SIZE(hx8369_seq_display_related));
if (ret < 0)
return ret;
ret = hx8357_spi_write_array(lcdev, hx8369_seq_panel_waveform_cycle,
ARRAY_SIZE(hx8369_seq_panel_waveform_cycle));
if (ret < 0)
return ret;
ret = hx8357_spi_write_array(lcdev, hx8369_seq_set_address_mode,
ARRAY_SIZE(hx8369_seq_set_address_mode));
if (ret < 0)
return ret;
ret = hx8357_spi_write_array(lcdev, hx8369_seq_vcom,
ARRAY_SIZE(hx8369_seq_vcom));
if (ret < 0)
return ret;
ret = hx8357_spi_write_array(lcdev, hx8369_seq_gip,
ARRAY_SIZE(hx8369_seq_gip));
if (ret < 0)
return ret;
ret = hx8357_spi_write_array(lcdev, hx8369_seq_power,
ARRAY_SIZE(hx8369_seq_power));
if (ret < 0)
return ret;
ret = hx8357_spi_write_byte(lcdev, HX8357_EXIT_SLEEP_MODE);
if (ret < 0)
return ret;
/*
* The controller needs 120ms to fully recover from exiting sleep mode
*/
msleep(120);
ret = hx8357_spi_write_array(lcdev, hx8369_seq_gamma_curve_related,
ARRAY_SIZE(hx8369_seq_gamma_curve_related));
if (ret < 0)
return ret;
ret = hx8357_spi_write_byte(lcdev, HX8357_EXIT_SLEEP_MODE);
if (ret < 0)
return ret;
usleep_range(1000, 1200);
ret = hx8357_spi_write_array(lcdev, hx8369_seq_write_CABC_control,
ARRAY_SIZE(hx8369_seq_write_CABC_control));
if (ret < 0)
return ret;
usleep_range(10000, 12000);
ret = hx8357_spi_write_array(lcdev,
hx8369_seq_write_CABC_control_setting,
ARRAY_SIZE(hx8369_seq_write_CABC_control_setting));
if (ret < 0)
return ret;
ret = hx8357_spi_write_array(lcdev,
hx8369_seq_write_CABC_min_brightness,
ARRAY_SIZE(hx8369_seq_write_CABC_min_brightness));
if (ret < 0)
return ret;
usleep_range(10000, 12000);
ret = hx8357_spi_write_array(lcdev, hx8369_seq_set_display_brightness,
ARRAY_SIZE(hx8369_seq_set_display_brightness));
if (ret < 0)
return ret;
ret = hx8357_spi_write_byte(lcdev, HX8357_SET_DISPLAY_ON);
if (ret < 0)
return ret;
return 0;
}
#define POWER_IS_ON(pwr) ((pwr) <= FB_BLANK_NORMAL) #define POWER_IS_ON(pwr) ((pwr) <= FB_BLANK_NORMAL)
static int hx8357_set_power(struct lcd_device *lcdev, int power) static int hx8357_set_power(struct lcd_device *lcdev, int power)
...@@ -388,10 +566,24 @@ static struct lcd_ops hx8357_ops = { ...@@ -388,10 +566,24 @@ static struct lcd_ops hx8357_ops = {
.get_power = hx8357_get_power, .get_power = hx8357_get_power,
}; };
static const struct of_device_id hx8357_dt_ids[] = {
{
.compatible = "himax,hx8357",
.data = hx8357_lcd_init,
},
{
.compatible = "himax,hx8369",
.data = hx8369_lcd_init,
},
{},
};
MODULE_DEVICE_TABLE(of, hx8357_dt_ids);
static int hx8357_probe(struct spi_device *spi) static int hx8357_probe(struct spi_device *spi)
{ {
struct lcd_device *lcdev; struct lcd_device *lcdev;
struct hx8357_data *lcd; struct hx8357_data *lcd;
const struct of_device_id *match;
int i, ret; int i, ret;
lcd = devm_kzalloc(&spi->dev, sizeof(*lcd), GFP_KERNEL); lcd = devm_kzalloc(&spi->dev, sizeof(*lcd), GFP_KERNEL);
...@@ -408,6 +600,10 @@ static int hx8357_probe(struct spi_device *spi) ...@@ -408,6 +600,10 @@ static int hx8357_probe(struct spi_device *spi)
lcd->spi = spi; lcd->spi = spi;
match = of_match_device(hx8357_dt_ids, &spi->dev);
if (!match || !match->data)
return -EINVAL;
lcd->reset = of_get_named_gpio(spi->dev.of_node, "gpios-reset", 0); lcd->reset = of_get_named_gpio(spi->dev.of_node, "gpios-reset", 0);
if (!gpio_is_valid(lcd->reset)) { if (!gpio_is_valid(lcd->reset)) {
dev_err(&spi->dev, "Missing dt property: gpios-reset\n"); dev_err(&spi->dev, "Missing dt property: gpios-reset\n");
...@@ -424,25 +620,32 @@ static int hx8357_probe(struct spi_device *spi) ...@@ -424,25 +620,32 @@ static int hx8357_probe(struct spi_device *spi)
return -EINVAL; return -EINVAL;
} }
for (i = 0; i < HX8357_NUM_IM_PINS; i++) { if (of_find_property(spi->dev.of_node, "im-gpios", NULL)) {
lcd->im_pins[i] = of_get_named_gpio(spi->dev.of_node, lcd->use_im_pins = 1;
"im-gpios", i);
if (lcd->im_pins[i] == -EPROBE_DEFER) { for (i = 0; i < HX8357_NUM_IM_PINS; i++) {
dev_info(&spi->dev, "GPIO requested is not here yet, deferring the probe\n"); lcd->im_pins[i] = of_get_named_gpio(spi->dev.of_node,
return -EPROBE_DEFER; "im-gpios", i);
} if (lcd->im_pins[i] == -EPROBE_DEFER) {
if (!gpio_is_valid(lcd->im_pins[i])) { dev_info(&spi->dev, "GPIO requested is not here yet, deferring the probe\n");
dev_err(&spi->dev, "Missing dt property: im-gpios\n"); return -EPROBE_DEFER;
return -EINVAL; }
} if (!gpio_is_valid(lcd->im_pins[i])) {
dev_err(&spi->dev, "Missing dt property: im-gpios\n");
ret = devm_gpio_request_one(&spi->dev, lcd->im_pins[i], return -EINVAL;
GPIOF_OUT_INIT_LOW, "im_pins"); }
if (ret) {
dev_err(&spi->dev, "failed to request gpio %d: %d\n", ret = devm_gpio_request_one(&spi->dev, lcd->im_pins[i],
lcd->im_pins[i], ret); GPIOF_OUT_INIT_LOW,
return -EINVAL; "im_pins");
if (ret) {
dev_err(&spi->dev, "failed to request gpio %d: %d\n",
lcd->im_pins[i], ret);
return -EINVAL;
}
} }
} else {
lcd->use_im_pins = 0;
} }
lcdev = lcd_device_register("mxsfb", &spi->dev, lcd, &hx8357_ops); lcdev = lcd_device_register("mxsfb", &spi->dev, lcd, &hx8357_ops);
...@@ -452,7 +655,9 @@ static int hx8357_probe(struct spi_device *spi) ...@@ -452,7 +655,9 @@ static int hx8357_probe(struct spi_device *spi)
} }
spi_set_drvdata(spi, lcdev); spi_set_drvdata(spi, lcdev);
ret = hx8357_lcd_init(lcdev); hx8357_lcd_reset(lcdev);
ret = ((int (*)(struct lcd_device *))match->data)(lcdev);
if (ret) { if (ret) {
dev_err(&spi->dev, "Couldn't initialize panel\n"); dev_err(&spi->dev, "Couldn't initialize panel\n");
goto init_error; goto init_error;
...@@ -475,12 +680,6 @@ static int hx8357_remove(struct spi_device *spi) ...@@ -475,12 +680,6 @@ static int hx8357_remove(struct spi_device *spi)
return 0; return 0;
} }
static const struct of_device_id hx8357_dt_ids[] = {
{ .compatible = "himax,hx8357" },
{},
};
MODULE_DEVICE_TABLE(of, hx8357_dt_ids);
static struct spi_driver hx8357_driver = { static struct spi_driver hx8357_driver = {
.probe = hx8357_probe, .probe = hx8357_probe,
.remove = hx8357_remove, .remove = hx8357_remove,
......
...@@ -246,7 +246,7 @@ static int lp855x_bl_update_status(struct backlight_device *bl) ...@@ -246,7 +246,7 @@ static int lp855x_bl_update_status(struct backlight_device *bl)
{ {
struct lp855x *lp = bl_get_data(bl); struct lp855x *lp = bl_get_data(bl);
if (bl->props.state & BL_CORE_SUSPENDED) if (bl->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK))
bl->props.brightness = 0; bl->props.brightness = 0;
if (lp->mode == PWM_BASED) { if (lp->mode == PWM_BASED) {
......
This diff is collapsed.
...@@ -72,6 +72,7 @@ static void efifb_destroy(struct fb_info *info) ...@@ -72,6 +72,7 @@ static void efifb_destroy(struct fb_info *info)
if (request_mem_succeeded) if (request_mem_succeeded)
release_mem_region(info->apertures->ranges[0].base, release_mem_region(info->apertures->ranges[0].base,
info->apertures->ranges[0].size); info->apertures->ranges[0].size);
fb_dealloc_cmap(&info->cmap);
framebuffer_release(info); framebuffer_release(info);
} }
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <video/exynos_mipi_dsim.h> #include <video/exynos_mipi_dsim.h>
#include "exynos_mipi_dsi_regs.h" #include "exynos_mipi_dsi_regs.h"
#include "exynos_mipi_dsi_lowlevel.h"
void exynos_mipi_dsi_func_reset(struct mipi_dsim_device *dsim) void exynos_mipi_dsi_func_reset(struct mipi_dsim_device *dsim)
{ {
......
...@@ -285,13 +285,8 @@ int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *info) ...@@ -285,13 +285,8 @@ int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *info)
rc = -ENODEV; rc = -ENODEV;
goto out; goto out;
} }
if (cmap->start < 0 || (!info->fbops->fb_setcolreg &&
!info->fbops->fb_setcmap)) {
rc = -EINVAL;
goto out1;
}
rc = fb_set_cmap(&umap, info); rc = fb_set_cmap(&umap, info);
out1:
unlock_fb_info(info); unlock_fb_info(info);
out: out:
fb_dealloc_cmap(&umap); fb_dealloc_cmap(&umap);
......
...@@ -43,8 +43,12 @@ ...@@ -43,8 +43,12 @@
#define FBPIXMAPSIZE (1024 * 8) #define FBPIXMAPSIZE (1024 * 8)
static DEFINE_MUTEX(registration_lock); static DEFINE_MUTEX(registration_lock);
struct fb_info *registered_fb[FB_MAX] __read_mostly; struct fb_info *registered_fb[FB_MAX] __read_mostly;
EXPORT_SYMBOL(registered_fb);
int num_registered_fb __read_mostly; int num_registered_fb __read_mostly;
EXPORT_SYMBOL(num_registered_fb);
static struct fb_info *get_fb_info(unsigned int idx) static struct fb_info *get_fb_info(unsigned int idx)
{ {
...@@ -182,6 +186,7 @@ char* fb_get_buffer_offset(struct fb_info *info, struct fb_pixmap *buf, u32 size ...@@ -182,6 +186,7 @@ char* fb_get_buffer_offset(struct fb_info *info, struct fb_pixmap *buf, u32 size
return addr; return addr;
} }
EXPORT_SYMBOL(fb_get_buffer_offset);
#ifdef CONFIG_LOGO #ifdef CONFIG_LOGO
...@@ -669,6 +674,7 @@ int fb_show_logo(struct fb_info *info, int rotate) ...@@ -669,6 +674,7 @@ int fb_show_logo(struct fb_info *info, int rotate)
int fb_prepare_logo(struct fb_info *info, int rotate) { return 0; } int fb_prepare_logo(struct fb_info *info, int rotate) { return 0; }
int fb_show_logo(struct fb_info *info, int rotate) { return 0; } int fb_show_logo(struct fb_info *info, int rotate) { return 0; }
#endif /* CONFIG_LOGO */ #endif /* CONFIG_LOGO */
EXPORT_SYMBOL(fb_show_logo);
static void *fb_seq_start(struct seq_file *m, loff_t *pos) static void *fb_seq_start(struct seq_file *m, loff_t *pos)
{ {
...@@ -909,6 +915,7 @@ fb_pan_display(struct fb_info *info, struct fb_var_screeninfo *var) ...@@ -909,6 +915,7 @@ fb_pan_display(struct fb_info *info, struct fb_var_screeninfo *var)
info->var.vmode &= ~FB_VMODE_YWRAP; info->var.vmode &= ~FB_VMODE_YWRAP;
return 0; return 0;
}