mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 12:44:11 +08:00
fbdev changes for v4.16:
- fix display-timings lookup in the Device Tree in atmel_lcdfb driver (Johan Hovold) - fix video mode and line_length to be set correctly in vfb driver (Pieter "PoroCYon" Sluys) - fix returning nonsensical values to the user-space on GIO_FONTX ioctl when using dummy console (Nicolas Pitre) - add missing license tag to mmpfb driver (Arnd Bergmann) - convert radeonfb and pxa3xx_gcu drivers to use ktime_get[_ts64]() instead of the deprecated do_gettimeofday() (Arnd Bergmann) - switch udlfb driver from using the pr_*() logging functions to the dev_*() ones + related cleanups (Ladislav Michl) - use __raw I/O accessors also on arm64 (Ji Zhang) - fix Kconfig help text for intelfb driver (Randy Dunlap) - do not duplicate features data in omapfb driver (Ladislav Michl) - misc cleanups (Colin Ian King, Markus Elfring, Rasmus Villemoes, Vasyl Gomonovych, Himanshu Jha, Michael Trimarchi) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABCAAGBQJaexPBAAoJEH4ztj+gR8ILeMgP/2CLJ4uucF8n3FuPgqYEs1sS 7fW/DM/WnN06QVGTSmx7c9gzEs1AciJXOWwcPmB96qHD7MflUovJqlJiLvmC2a4I c5bMb/NZWMaKK5nQ8Rs2Xg07tUwF2FQD/62H7Qa+lsM0dIqfF27atzXskYKDcCG/ SYKttQJksOaZLcFHB+FpOr87jte2P3mjyspy88+TFFRy05CPV11PFcnZ7GoI8Auz arNhf1WkZ7sWbtoJv9U/EmW3mk+nepvitBovUxiMYudTdPt2M8CyAzOspPPw7fyO zJqQtEgR18qmUcO6Lxzw0fL2C4pxt65iBO0kzIrAGton+o8u/QwZEkJvNy6LB0IZ yOG8Qdd9sPelwcHlVQw/a7x1h+wlU8DbwwzzjC3WBxGUFA8op7z2gwMjsK2OK54V sBQDaCRUjtFn7vV1xRAmGo18Yw9p40ZtHq/zaIvdlXZ6VAN1G2Mf25XeWQZzz4L4 sMIJAtQETLeTiGpBCVDPKx5dN31g/GSEatGkT0C/kmoJXrAwb2JfB1Hemj5LSOq9 DYCdXbSR883DgYQ7QqXsXH0Sj6hGNWD66/7HeC7xmL/TBs4+dO+1YLxrWK5QZGMa 02K+obWg/xYqO+wkf6wC4zFGkCsHVf4sODirzBCrRpvntrRy7/kNScEEQJDOHZNl AbyPiTczZjkUKhUidM8G =bUB+ -----END PGP SIGNATURE----- Merge tag 'fbdev-v4.16' of git://github.com/bzolnier/linux Pull fbdev updates from Bartlomiej Zolnierkiewicz: "There is nothing really major here: - fix display-timings lookup in the Device Tree in atmel_lcdfb driver (Johan Hovold) - fix video mode and line_length to be set correctly in vfb driver (Pieter "PoroCYon" Sluys) - fix returning nonsensical values to the user-space on GIO_FONTX ioctl when using dummy console (Nicolas Pitre) - add missing license tag to mmpfb driver (Arnd Bergmann) - convert radeonfb and pxa3xx_gcu drivers to use ktime_get[_ts64]() instead of the deprecated do_gettimeofday() (Arnd Bergmann) - switch udlfb driver from using the pr_*() logging functions to the dev_*() ones + related cleanups (Ladislav Michl) - use __raw I/O accessors also on arm64 (Ji Zhang) - fix Kconfig help text for intelfb driver (Randy Dunlap) - do not duplicate features data in omapfb driver (Ladislav Michl) - misc cleanups (Colin Ian King, Markus Elfring, Rasmus Villemoes, Vasyl Gomonovych, Himanshu Jha, Michael Trimarchi)" * tag 'fbdev-v4.16' of git://github.com/bzolnier/linux: (25 commits) video: udlfb: Switch from the pr_*() to the dev_*() logging functions video: udlfb: Constify read only data video: fbdev/mmp: add MODULE_LICENSE console/dummy: leave .con_font_get set to NULL fbdev: mxsfb: use framebuffer_alloc in the correct way video: udlfb: Do not name private data 'dev' video: udlfb: Remove noisy warnings video: udlfb: Remove redundant gdev variable video: udlfb: Remove unnecessary local variable fbdev: auo_k190x: Use zeroing memory allocator instead of allocator/memset vfb: fix video mode and line_length being set when loaded fbdev: arm64 use __raw I/O memory api omapfb: dss: Do not duplicate features data video: fbdev: omap2: Use PTR_ERR_OR_ZERO() fbdev: au1200fb: delete duplicate header contents fbdev: pxa3xx: use ktime_get_ts64 for time stamps fbdev: radeon: use ktime_get() for HZ calibration video: smscufx: Improve a size determination in two functions video: udlfb: Delete an unnecessary return statement in two functions video: udlfb: Improve a size determination in dlfb_alloc_urb_list() ...
This commit is contained in:
commit
c3611b6d7f
@ -67,7 +67,6 @@ const struct consw dummy_con = {
|
||||
.con_switch = DUMMY,
|
||||
.con_blank = DUMMY,
|
||||
.con_font_set = DUMMY,
|
||||
.con_font_get = DUMMY,
|
||||
.con_font_default = DUMMY,
|
||||
.con_font_copy = DUMMY,
|
||||
};
|
||||
|
@ -1188,7 +1188,7 @@ config FB_INTEL
|
||||
830M/845G/852GM/855GM/865G/915G/915GM/945G/945GM/965G/965GM chipsets.
|
||||
Say Y if you have and plan to use such a board.
|
||||
|
||||
To make FB_INTELFB=Y work you need to say AGP_INTEL=y too.
|
||||
To make FB_INTEL=Y work you need to say AGP_INTEL=y too.
|
||||
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called intelfb.
|
||||
|
@ -1119,7 +1119,7 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
|
||||
goto put_display_node;
|
||||
}
|
||||
|
||||
timings_np = of_find_node_by_name(display_np, "display-timings");
|
||||
timings_np = of_get_child_by_name(display_np, "display-timings");
|
||||
if (!timings_np) {
|
||||
dev_err(dev, "failed to find display-timings node\n");
|
||||
ret = -ENODEV;
|
||||
@ -1140,6 +1140,12 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
|
||||
fb_add_videomode(&fb_vm, &info->modelist);
|
||||
}
|
||||
|
||||
/*
|
||||
* FIXME: Make sure we are not referencing any fields in display_np
|
||||
* and timings_np and drop our references to them before returning to
|
||||
* avoid leaking the nodes on probe deferral and driver unbind.
|
||||
*/
|
||||
|
||||
return 0;
|
||||
|
||||
put_timings_node:
|
||||
|
@ -583,8 +583,8 @@ static int radeon_probe_pll_params(struct radeonfb_info *rinfo)
|
||||
int hTotal, vTotal, num, denom, m, n;
|
||||
unsigned long long hz, vclk;
|
||||
long xtal;
|
||||
struct timeval start_tv, stop_tv;
|
||||
long total_secs, total_usecs;
|
||||
ktime_t start_time, stop_time;
|
||||
u64 total_usecs;
|
||||
int i;
|
||||
|
||||
/* Ugh, we cut interrupts, bad bad bad, but we want some precision
|
||||
@ -600,7 +600,7 @@ static int radeon_probe_pll_params(struct radeonfb_info *rinfo)
|
||||
if (((INREG(CRTC_VLINE_CRNT_VLINE) >> 16) & 0x3ff) == 0)
|
||||
break;
|
||||
|
||||
do_gettimeofday(&start_tv);
|
||||
start_time = ktime_get();
|
||||
|
||||
for(i=0; i<1000000; i++)
|
||||
if (((INREG(CRTC_VLINE_CRNT_VLINE) >> 16) & 0x3ff) != 0)
|
||||
@ -610,18 +610,14 @@ static int radeon_probe_pll_params(struct radeonfb_info *rinfo)
|
||||
if (((INREG(CRTC_VLINE_CRNT_VLINE) >> 16) & 0x3ff) == 0)
|
||||
break;
|
||||
|
||||
do_gettimeofday(&stop_tv);
|
||||
stop_time = ktime_get();
|
||||
|
||||
local_irq_enable();
|
||||
|
||||
total_secs = stop_tv.tv_sec - start_tv.tv_sec;
|
||||
if (total_secs > 10)
|
||||
total_usecs = ktime_us_delta(stop_time, start_time);
|
||||
if (total_usecs >= 10 * USEC_PER_SEC || total_usecs == 0)
|
||||
return -1;
|
||||
total_usecs = stop_tv.tv_usec - start_tv.tv_usec;
|
||||
total_usecs += total_secs * 1000000;
|
||||
if (total_usecs < 0)
|
||||
total_usecs = -total_usecs;
|
||||
hz = 1000000/total_usecs;
|
||||
hz = USEC_PER_SEC/(u32)total_usecs;
|
||||
|
||||
hTotal = ((INREG(CRTC_H_TOTAL_DISP) & 0x1ff) + 1) * 8;
|
||||
vTotal = ((INREG(CRTC_V_TOTAL_DISP) & 0x3ff) + 1);
|
||||
|
@ -284,289 +284,3 @@ struct au1200_lcd {
|
||||
|
||||
/********************************************************************/
|
||||
#endif /* _AU1200LCD_H */
|
||||
/*
|
||||
* BRIEF MODULE DESCRIPTION
|
||||
* Hardware definitions for the Au1200 LCD controller
|
||||
*
|
||||
* Copyright 2004 AMD
|
||||
* Author: AMD
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
|
||||
* NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
||||
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef _AU1200LCD_H
|
||||
#define _AU1200LCD_H
|
||||
|
||||
/********************************************************************/
|
||||
#define AU1200_LCD_ADDR 0xB5000000
|
||||
|
||||
#define uint8 unsigned char
|
||||
#define uint32 unsigned int
|
||||
|
||||
struct au1200_lcd {
|
||||
volatile uint32 reserved0;
|
||||
volatile uint32 screen;
|
||||
volatile uint32 backcolor;
|
||||
volatile uint32 horztiming;
|
||||
volatile uint32 verttiming;
|
||||
volatile uint32 clkcontrol;
|
||||
volatile uint32 pwmdiv;
|
||||
volatile uint32 pwmhi;
|
||||
volatile uint32 reserved1;
|
||||
volatile uint32 winenable;
|
||||
volatile uint32 colorkey;
|
||||
volatile uint32 colorkeymsk;
|
||||
struct
|
||||
{
|
||||
volatile uint32 cursorctrl;
|
||||
volatile uint32 cursorpos;
|
||||
volatile uint32 cursorcolor0;
|
||||
volatile uint32 cursorcolor1;
|
||||
volatile uint32 cursorcolor2;
|
||||
uint32 cursorcolor3;
|
||||
} hwc;
|
||||
volatile uint32 intstatus;
|
||||
volatile uint32 intenable;
|
||||
volatile uint32 outmask;
|
||||
volatile uint32 fifoctrl;
|
||||
uint32 reserved2[(0x0100-0x0058)/4];
|
||||
struct
|
||||
{
|
||||
volatile uint32 winctrl0;
|
||||
volatile uint32 winctrl1;
|
||||
volatile uint32 winctrl2;
|
||||
volatile uint32 winbuf0;
|
||||
volatile uint32 winbuf1;
|
||||
volatile uint32 winbufctrl;
|
||||
uint32 winreserved0;
|
||||
uint32 winreserved1;
|
||||
} window[4];
|
||||
|
||||
uint32 reserved3[(0x0400-0x0180)/4];
|
||||
|
||||
volatile uint32 palette[(0x0800-0x0400)/4];
|
||||
|
||||
volatile uint8 cursorpattern[256];
|
||||
};
|
||||
|
||||
/* lcd_screen */
|
||||
#define LCD_SCREEN_SEN (1<<31)
|
||||
#define LCD_SCREEN_SX (0x07FF<<19)
|
||||
#define LCD_SCREEN_SY (0x07FF<< 8)
|
||||
#define LCD_SCREEN_SWP (1<<7)
|
||||
#define LCD_SCREEN_SWD (1<<6)
|
||||
#define LCD_SCREEN_PT (7<<0)
|
||||
#define LCD_SCREEN_PT_TFT (0<<0)
|
||||
#define LCD_SCREEN_SX_N(WIDTH) ((WIDTH-1)<<19)
|
||||
#define LCD_SCREEN_SY_N(HEIGHT) ((HEIGHT-1)<<8)
|
||||
#define LCD_SCREEN_PT_CSTN (1<<0)
|
||||
#define LCD_SCREEN_PT_CDSTN (2<<0)
|
||||
#define LCD_SCREEN_PT_M8STN (3<<0)
|
||||
#define LCD_SCREEN_PT_M4STN (4<<0)
|
||||
|
||||
/* lcd_backcolor */
|
||||
#define LCD_BACKCOLOR_SBGR (0xFF<<16)
|
||||
#define LCD_BACKCOLOR_SBGG (0xFF<<8)
|
||||
#define LCD_BACKCOLOR_SBGB (0xFF<<0)
|
||||
#define LCD_BACKCOLOR_SBGR_N(N) ((N)<<16)
|
||||
#define LCD_BACKCOLOR_SBGG_N(N) ((N)<<8)
|
||||
#define LCD_BACKCOLOR_SBGB_N(N) ((N)<<0)
|
||||
|
||||
/* lcd_winenable */
|
||||
#define LCD_WINENABLE_WEN3 (1<<3)
|
||||
#define LCD_WINENABLE_WEN2 (1<<2)
|
||||
#define LCD_WINENABLE_WEN1 (1<<1)
|
||||
#define LCD_WINENABLE_WEN0 (1<<0)
|
||||
|
||||
/* lcd_colorkey */
|
||||
#define LCD_COLORKEY_CKR (0xFF<<16)
|
||||
#define LCD_COLORKEY_CKG (0xFF<<8)
|
||||
#define LCD_COLORKEY_CKB (0xFF<<0)
|
||||
#define LCD_COLORKEY_CKR_N(N) ((N)<<16)
|
||||
#define LCD_COLORKEY_CKG_N(N) ((N)<<8)
|
||||
#define LCD_COLORKEY_CKB_N(N) ((N)<<0)
|
||||
|
||||
/* lcd_colorkeymsk */
|
||||
#define LCD_COLORKEYMSK_CKMR (0xFF<<16)
|
||||
#define LCD_COLORKEYMSK_CKMG (0xFF<<8)
|
||||
#define LCD_COLORKEYMSK_CKMB (0xFF<<0)
|
||||
#define LCD_COLORKEYMSK_CKMR_N(N) ((N)<<16)
|
||||
#define LCD_COLORKEYMSK_CKMG_N(N) ((N)<<8)
|
||||
#define LCD_COLORKEYMSK_CKMB_N(N) ((N)<<0)
|
||||
|
||||
/* lcd windows control 0 */
|
||||
#define LCD_WINCTRL0_OX (0x07FF<<21)
|
||||
#define LCD_WINCTRL0_OY (0x07FF<<10)
|
||||
#define LCD_WINCTRL0_A (0x00FF<<2)
|
||||
#define LCD_WINCTRL0_AEN (1<<1)
|
||||
#define LCD_WINCTRL0_OX_N(N) ((N)<<21)
|
||||
#define LCD_WINCTRL0_OY_N(N) ((N)<<10)
|
||||
#define LCD_WINCTRL0_A_N(N) ((N)<<2)
|
||||
|
||||
/* lcd windows control 1 */
|
||||
#define LCD_WINCTRL1_PRI (3<<30)
|
||||
#define LCD_WINCTRL1_PIPE (1<<29)
|
||||
#define LCD_WINCTRL1_FRM (0xF<<25)
|
||||
#define LCD_WINCTRL1_CCO (1<<24)
|
||||
#define LCD_WINCTRL1_PO (3<<22)
|
||||
#define LCD_WINCTRL1_SZX (0x07FF<<11)
|
||||
#define LCD_WINCTRL1_SZY (0x07FF<<0)
|
||||
#define LCD_WINCTRL1_FRM_1BPP (0<<25)
|
||||
#define LCD_WINCTRL1_FRM_2BPP (1<<25)
|
||||
#define LCD_WINCTRL1_FRM_4BPP (2<<25)
|
||||
#define LCD_WINCTRL1_FRM_8BPP (3<<25)
|
||||
#define LCD_WINCTRL1_FRM_12BPP (4<<25)
|
||||
#define LCD_WINCTRL1_FRM_16BPP655 (5<<25)
|
||||
#define LCD_WINCTRL1_FRM_16BPP565 (6<<25)
|
||||
#define LCD_WINCTRL1_FRM_16BPP556 (7<<25)
|
||||
#define LCD_WINCTRL1_FRM_16BPPI1555 (8<<25)
|
||||
#define LCD_WINCTRL1_FRM_16BPPI5551 (9<<25)
|
||||
#define LCD_WINCTRL1_FRM_16BPPA1555 (10<<25)
|
||||
#define LCD_WINCTRL1_FRM_16BPPA5551 (11<<25)
|
||||
#define LCD_WINCTRL1_FRM_24BPP (12<<25)
|
||||
#define LCD_WINCTRL1_FRM_32BPP (13<<25)
|
||||
#define LCD_WINCTRL1_PRI_N(N) ((N)<<30)
|
||||
#define LCD_WINCTRL1_PO_00 (0<<22)
|
||||
#define LCD_WINCTRL1_PO_01 (1<<22)
|
||||
#define LCD_WINCTRL1_PO_10 (2<<22)
|
||||
#define LCD_WINCTRL1_PO_11 (3<<22)
|
||||
#define LCD_WINCTRL1_SZX_N(N) ((N-1)<<11)
|
||||
#define LCD_WINCTRL1_SZY_N(N) ((N-1)<<0)
|
||||
|
||||
/* lcd windows control 2 */
|
||||
#define LCD_WINCTRL2_CKMODE (3<<24)
|
||||
#define LCD_WINCTRL2_DBM (1<<23)
|
||||
#define LCD_WINCTRL2_RAM (3<<21)
|
||||
#define LCD_WINCTRL2_BX (0x1FFF<<8)
|
||||
#define LCD_WINCTRL2_SCX (0xF<<4)
|
||||
#define LCD_WINCTRL2_SCY (0xF<<0)
|
||||
#define LCD_WINCTRL2_CKMODE_00 (0<<24)
|
||||
#define LCD_WINCTRL2_CKMODE_01 (1<<24)
|
||||
#define LCD_WINCTRL2_CKMODE_10 (2<<24)
|
||||
#define LCD_WINCTRL2_CKMODE_11 (3<<24)
|
||||
#define LCD_WINCTRL2_RAM_NONE (0<<21)
|
||||
#define LCD_WINCTRL2_RAM_PALETTE (1<<21)
|
||||
#define LCD_WINCTRL2_RAM_GAMMA (2<<21)
|
||||
#define LCD_WINCTRL2_RAM_BUFFER (3<<21)
|
||||
#define LCD_WINCTRL2_BX_N(N) ((N)<<8)
|
||||
#define LCD_WINCTRL2_SCX_1 (0<<4)
|
||||
#define LCD_WINCTRL2_SCX_2 (1<<4)
|
||||
#define LCD_WINCTRL2_SCX_4 (2<<4)
|
||||
#define LCD_WINCTRL2_SCY_1 (0<<0)
|
||||
#define LCD_WINCTRL2_SCY_2 (1<<0)
|
||||
#define LCD_WINCTRL2_SCY_4 (2<<0)
|
||||
|
||||
/* lcd windows buffer control */
|
||||
#define LCD_WINBUFCTRL_DB (1<<1)
|
||||
#define LCD_WINBUFCTRL_DBN (1<<0)
|
||||
|
||||
/* lcd_intstatus, lcd_intenable */
|
||||
#define LCD_INT_IFO (0xF<<14)
|
||||
#define LCD_INT_IFU (0xF<<10)
|
||||
#define LCD_INT_OFO (1<<9)
|
||||
#define LCD_INT_OFU (1<<8)
|
||||
#define LCD_INT_WAIT (1<<3)
|
||||
#define LCD_INT_SD (1<<2)
|
||||
#define LCD_INT_SA (1<<1)
|
||||
#define LCD_INT_SS (1<<0)
|
||||
|
||||
/* lcd_horztiming */
|
||||
#define LCD_HORZTIMING_HND2 (0x1FF<<18)
|
||||
#define LCD_HORZTIMING_HND1 (0x1FF<<9)
|
||||
#define LCD_HORZTIMING_HPW (0x1FF<<0)
|
||||
#define LCD_HORZTIMING_HND2_N(N)(((N)-1)<<18)
|
||||
#define LCD_HORZTIMING_HND1_N(N)(((N)-1)<<9)
|
||||
#define LCD_HORZTIMING_HPW_N(N) (((N)-1)<<0)
|
||||
|
||||
/* lcd_verttiming */
|
||||
#define LCD_VERTTIMING_VND2 (0x1FF<<18)
|
||||
#define LCD_VERTTIMING_VND1 (0x1FF<<9)
|
||||
#define LCD_VERTTIMING_VPW (0x1FF<<0)
|
||||
#define LCD_VERTTIMING_VND2_N(N)(((N)-1)<<18)
|
||||
#define LCD_VERTTIMING_VND1_N(N)(((N)-1)<<9)
|
||||
#define LCD_VERTTIMING_VPW_N(N) (((N)-1)<<0)
|
||||
|
||||
/* lcd_clkcontrol */
|
||||
#define LCD_CLKCONTROL_EXT (1<<22)
|
||||
#define LCD_CLKCONTROL_DELAY (3<<20)
|
||||
#define LCD_CLKCONTROL_CDD (1<<19)
|
||||
#define LCD_CLKCONTROL_IB (1<<18)
|
||||
#define LCD_CLKCONTROL_IC (1<<17)
|
||||
#define LCD_CLKCONTROL_IH (1<<16)
|
||||
#define LCD_CLKCONTROL_IV (1<<15)
|
||||
#define LCD_CLKCONTROL_BF (0x1F<<10)
|
||||
#define LCD_CLKCONTROL_PCD (0x3FF<<0)
|
||||
#define LCD_CLKCONTROL_BF_N(N) (((N)-1)<<10)
|
||||
#define LCD_CLKCONTROL_PCD_N(N) ((N)<<0)
|
||||
|
||||
/* lcd_pwmdiv */
|
||||
#define LCD_PWMDIV_EN (1<<31)
|
||||
#define LCD_PWMDIV_PWMDIV (0x1FFFF<<0)
|
||||
#define LCD_PWMDIV_PWMDIV_N(N) ((N)<<0)
|
||||
|
||||
/* lcd_pwmhi */
|
||||
#define LCD_PWMHI_PWMHI1 (0xFFFF<<16)
|
||||
#define LCD_PWMHI_PWMHI0 (0xFFFF<<0)
|
||||
#define LCD_PWMHI_PWMHI1_N(N) ((N)<<16)
|
||||
#define LCD_PWMHI_PWMHI0_N(N) ((N)<<0)
|
||||
|
||||
/* lcd_hwccon */
|
||||
#define LCD_HWCCON_EN (1<<0)
|
||||
|
||||
/* lcd_cursorpos */
|
||||
#define LCD_CURSORPOS_HWCXOFF (0x1F<<27)
|
||||
#define LCD_CURSORPOS_HWCXPOS (0x07FF<<16)
|
||||
#define LCD_CURSORPOS_HWCYOFF (0x1F<<11)
|
||||
#define LCD_CURSORPOS_HWCYPOS (0x07FF<<0)
|
||||
#define LCD_CURSORPOS_HWCXOFF_N(N) ((N)<<27)
|
||||
#define LCD_CURSORPOS_HWCXPOS_N(N) ((N)<<16)
|
||||
#define LCD_CURSORPOS_HWCYOFF_N(N) ((N)<<11)
|
||||
#define LCD_CURSORPOS_HWCYPOS_N(N) ((N)<<0)
|
||||
|
||||
/* lcd_cursorcolor */
|
||||
#define LCD_CURSORCOLOR_HWCA (0xFF<<24)
|
||||
#define LCD_CURSORCOLOR_HWCR (0xFF<<16)
|
||||
#define LCD_CURSORCOLOR_HWCG (0xFF<<8)
|
||||
#define LCD_CURSORCOLOR_HWCB (0xFF<<0)
|
||||
#define LCD_CURSORCOLOR_HWCA_N(N) ((N)<<24)
|
||||
#define LCD_CURSORCOLOR_HWCR_N(N) ((N)<<16)
|
||||
#define LCD_CURSORCOLOR_HWCG_N(N) ((N)<<8)
|
||||
#define LCD_CURSORCOLOR_HWCB_N(N) ((N)<<0)
|
||||
|
||||
/* lcd_fifoctrl */
|
||||
#define LCD_FIFOCTRL_F3IF (1<<29)
|
||||
#define LCD_FIFOCTRL_F3REQ (0x1F<<24)
|
||||
#define LCD_FIFOCTRL_F2IF (1<<29)
|
||||
#define LCD_FIFOCTRL_F2REQ (0x1F<<16)
|
||||
#define LCD_FIFOCTRL_F1IF (1<<29)
|
||||
#define LCD_FIFOCTRL_F1REQ (0x1F<<8)
|
||||
#define LCD_FIFOCTRL_F0IF (1<<29)
|
||||
#define LCD_FIFOCTRL_F0REQ (0x1F<<0)
|
||||
#define LCD_FIFOCTRL_F3REQ_N(N) ((N-1)<<24)
|
||||
#define LCD_FIFOCTRL_F2REQ_N(N) ((N-1)<<16)
|
||||
#define LCD_FIFOCTRL_F1REQ_N(N) ((N-1)<<8)
|
||||
#define LCD_FIFOCTRL_F0REQ_N(N) ((N-1)<<0)
|
||||
|
||||
/* lcd_outmask */
|
||||
#define LCD_OUTMASK_MASK (0x00FFFFFF)
|
||||
|
||||
/********************************************************************/
|
||||
#endif /* _AU1200LCD_H */
|
||||
|
@ -1056,13 +1056,12 @@ int auok190x_common_probe(struct platform_device *pdev,
|
||||
/* videomemory handling */
|
||||
|
||||
videomemorysize = roundup((panel->w * panel->h) * 2, PAGE_SIZE);
|
||||
videomemory = vmalloc(videomemorysize);
|
||||
videomemory = vzalloc(videomemorysize);
|
||||
if (!videomemory) {
|
||||
ret = -ENOMEM;
|
||||
goto err_irq;
|
||||
}
|
||||
|
||||
memset(videomemory, 0, videomemorysize);
|
||||
info->screen_base = (char *)videomemory;
|
||||
info->fix.smem_len = videomemorysize;
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/module.h>
|
||||
#include <video/mmp_disp.h>
|
||||
|
||||
static struct mmp_overlay *path_get_overlay(struct mmp_path *path,
|
||||
@ -249,3 +250,7 @@ void mmp_unregister_path(struct mmp_path *path)
|
||||
mutex_unlock(&disp_lock);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mmp_unregister_path);
|
||||
|
||||
MODULE_AUTHOR("Zhou Zhu <zzhu3@marvell.com>");
|
||||
MODULE_DESCRIPTION("Marvell MMP display framework");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
@ -169,7 +169,6 @@ struct mxsfb_devdata {
|
||||
};
|
||||
|
||||
struct mxsfb_info {
|
||||
struct fb_info fb_info;
|
||||
struct platform_device *pdev;
|
||||
struct clk *clk;
|
||||
struct clk *clk_axi;
|
||||
@ -208,8 +207,6 @@ static const struct mxsfb_devdata mxsfb_devdata[] = {
|
||||
},
|
||||
};
|
||||
|
||||
#define to_imxfb_host(x) (container_of(x, struct mxsfb_info, fb_info))
|
||||
|
||||
/* mask and shift depends on architecture */
|
||||
static inline u32 set_hsync_pulse_width(struct mxsfb_info *host, unsigned val)
|
||||
{
|
||||
@ -269,7 +266,7 @@ static inline unsigned chan_to_field(unsigned chan, struct fb_bitfield *bf)
|
||||
static int mxsfb_check_var(struct fb_var_screeninfo *var,
|
||||
struct fb_info *fb_info)
|
||||
{
|
||||
struct mxsfb_info *host = to_imxfb_host(fb_info);
|
||||
struct mxsfb_info *host = fb_info->par;
|
||||
const struct fb_bitfield *rgb = NULL;
|
||||
|
||||
if (var->xres < MIN_XRES)
|
||||
@ -330,7 +327,7 @@ static inline void mxsfb_disable_axi_clk(struct mxsfb_info *host)
|
||||
|
||||
static void mxsfb_enable_controller(struct fb_info *fb_info)
|
||||
{
|
||||
struct mxsfb_info *host = to_imxfb_host(fb_info);
|
||||
struct mxsfb_info *host = fb_info->par;
|
||||
u32 reg;
|
||||
int ret;
|
||||
|
||||
@ -367,7 +364,7 @@ static void mxsfb_enable_controller(struct fb_info *fb_info)
|
||||
|
||||
static void mxsfb_disable_controller(struct fb_info *fb_info)
|
||||
{
|
||||
struct mxsfb_info *host = to_imxfb_host(fb_info);
|
||||
struct mxsfb_info *host = fb_info->par;
|
||||
unsigned loop;
|
||||
u32 reg;
|
||||
int ret;
|
||||
@ -409,7 +406,7 @@ static void mxsfb_disable_controller(struct fb_info *fb_info)
|
||||
|
||||
static int mxsfb_set_par(struct fb_info *fb_info)
|
||||
{
|
||||
struct mxsfb_info *host = to_imxfb_host(fb_info);
|
||||
struct mxsfb_info *host = fb_info->par;
|
||||
u32 ctrl, vdctrl0, vdctrl4;
|
||||
int line_size, fb_size;
|
||||
int reenable = 0;
|
||||
@ -569,7 +566,7 @@ static int mxsfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
|
||||
|
||||
static int mxsfb_blank(int blank, struct fb_info *fb_info)
|
||||
{
|
||||
struct mxsfb_info *host = to_imxfb_host(fb_info);
|
||||
struct mxsfb_info *host = fb_info->par;
|
||||
|
||||
switch (blank) {
|
||||
case FB_BLANK_POWERDOWN:
|
||||
@ -591,7 +588,7 @@ static int mxsfb_blank(int blank, struct fb_info *fb_info)
|
||||
static int mxsfb_pan_display(struct fb_var_screeninfo *var,
|
||||
struct fb_info *fb_info)
|
||||
{
|
||||
struct mxsfb_info *host = to_imxfb_host(fb_info);
|
||||
struct mxsfb_info *host = fb_info->par;
|
||||
unsigned offset;
|
||||
|
||||
if (var->xoffset != 0)
|
||||
@ -622,10 +619,10 @@ static struct fb_ops mxsfb_ops = {
|
||||
.fb_imageblit = cfb_imageblit,
|
||||
};
|
||||
|
||||
static int mxsfb_restore_mode(struct mxsfb_info *host,
|
||||
static int mxsfb_restore_mode(struct fb_info *fb_info,
|
||||
struct fb_videomode *vmode)
|
||||
{
|
||||
struct fb_info *fb_info = &host->fb_info;
|
||||
struct mxsfb_info *host = fb_info->par;
|
||||
unsigned line_count;
|
||||
unsigned period;
|
||||
unsigned long pa, fbsize;
|
||||
@ -726,10 +723,10 @@ err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int mxsfb_init_fbinfo_dt(struct mxsfb_info *host,
|
||||
static int mxsfb_init_fbinfo_dt(struct fb_info *fb_info,
|
||||
struct fb_videomode *vmode)
|
||||
{
|
||||
struct fb_info *fb_info = &host->fb_info;
|
||||
struct mxsfb_info *host = fb_info->par;
|
||||
struct fb_var_screeninfo *var = &fb_info->var;
|
||||
struct device *dev = &host->pdev->dev;
|
||||
struct device_node *np = host->pdev->dev.of_node;
|
||||
@ -805,12 +802,12 @@ put_display_node:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int mxsfb_init_fbinfo(struct mxsfb_info *host,
|
||||
static int mxsfb_init_fbinfo(struct fb_info *fb_info,
|
||||
struct fb_videomode *vmode)
|
||||
{
|
||||
int ret;
|
||||
struct mxsfb_info *host = fb_info->par;
|
||||
struct device *dev = &host->pdev->dev;
|
||||
struct fb_info *fb_info = &host->fb_info;
|
||||
struct fb_var_screeninfo *var = &fb_info->var;
|
||||
dma_addr_t fb_phys;
|
||||
void *fb_virt;
|
||||
@ -824,7 +821,7 @@ static int mxsfb_init_fbinfo(struct mxsfb_info *host,
|
||||
fb_info->fix.visual = FB_VISUAL_TRUECOLOR,
|
||||
fb_info->fix.accel = FB_ACCEL_NONE;
|
||||
|
||||
ret = mxsfb_init_fbinfo_dt(host, vmode);
|
||||
ret = mxsfb_init_fbinfo_dt(fb_info, vmode);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@ -843,16 +840,16 @@ static int mxsfb_init_fbinfo(struct mxsfb_info *host,
|
||||
fb_info->screen_base = fb_virt;
|
||||
fb_info->screen_size = fb_info->fix.smem_len = fb_size;
|
||||
|
||||
if (mxsfb_restore_mode(host, vmode))
|
||||
if (mxsfb_restore_mode(fb_info, vmode))
|
||||
memset(fb_virt, 0, fb_size);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void mxsfb_free_videomem(struct mxsfb_info *host)
|
||||
static void mxsfb_free_videomem(struct fb_info *fb_info)
|
||||
{
|
||||
struct mxsfb_info *host = fb_info->par;
|
||||
struct device *dev = &host->pdev->dev;
|
||||
struct fb_info *fb_info = &host->fb_info;
|
||||
|
||||
dma_free_wc(dev, fb_info->screen_size, fb_info->screen_base,
|
||||
fb_info->fix.smem_start);
|
||||
@ -902,7 +899,7 @@ static int mxsfb_probe(struct platform_device *pdev)
|
||||
if (mode == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
host = to_imxfb_host(fb_info);
|
||||
host = fb_info->par;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
host->base = devm_ioremap_resource(&pdev->dev, res);
|
||||
@ -941,7 +938,7 @@ static int mxsfb_probe(struct platform_device *pdev)
|
||||
goto fb_release;
|
||||
}
|
||||
|
||||
ret = mxsfb_init_fbinfo(host, mode);
|
||||
ret = mxsfb_init_fbinfo(fb_info, mode);
|
||||
if (ret != 0)
|
||||
goto fb_release;
|
||||
|
||||
@ -982,13 +979,13 @@ fb_release:
|
||||
static int mxsfb_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct fb_info *fb_info = platform_get_drvdata(pdev);
|
||||
struct mxsfb_info *host = to_imxfb_host(fb_info);
|
||||
struct mxsfb_info *host = fb_info->par;
|
||||
|
||||
if (host->enabled)
|
||||
mxsfb_disable_controller(fb_info);
|
||||
|
||||
unregister_framebuffer(fb_info);
|
||||
mxsfb_free_videomem(host);
|
||||
mxsfb_free_videomem(fb_info);
|
||||
|
||||
framebuffer_release(fb_info);
|
||||
|
||||
@ -998,7 +995,7 @@ static int mxsfb_remove(struct platform_device *pdev)
|
||||
static void mxsfb_shutdown(struct platform_device *pdev)
|
||||
{
|
||||
struct fb_info *fb_info = platform_get_drvdata(pdev);
|
||||
struct mxsfb_info *host = to_imxfb_host(fb_info);
|
||||
struct mxsfb_info *host = fb_info->par;
|
||||
|
||||
mxsfb_enable_axi_clk(host);
|
||||
|
||||
|
@ -3976,52 +3976,33 @@ static const struct dispc_features omap54xx_dispc_feats = {
|
||||
.has_writeback = true,
|
||||
};
|
||||
|
||||
static int dispc_init_features(struct platform_device *pdev)
|
||||
static const struct dispc_features *dispc_get_features(void)
|
||||
{
|
||||
const struct dispc_features *src;
|
||||
struct dispc_features *dst;
|
||||
|
||||
dst = devm_kzalloc(&pdev->dev, sizeof(*dst), GFP_KERNEL);
|
||||
if (!dst) {
|
||||
dev_err(&pdev->dev, "Failed to allocate DISPC Features\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
switch (omapdss_get_version()) {
|
||||
case OMAPDSS_VER_OMAP24xx:
|
||||
src = &omap24xx_dispc_feats;
|
||||
break;
|
||||
return &omap24xx_dispc_feats;
|
||||
|
||||
case OMAPDSS_VER_OMAP34xx_ES1:
|
||||
src = &omap34xx_rev1_0_dispc_feats;
|
||||
break;
|
||||
return &omap34xx_rev1_0_dispc_feats;
|
||||
|
||||
case OMAPDSS_VER_OMAP34xx_ES3:
|
||||
case OMAPDSS_VER_OMAP3630:
|
||||
case OMAPDSS_VER_AM35xx:
|
||||
case OMAPDSS_VER_AM43xx:
|
||||
src = &omap34xx_rev3_0_dispc_feats;
|
||||
break;
|
||||
return &omap34xx_rev3_0_dispc_feats;
|
||||
|
||||
case OMAPDSS_VER_OMAP4430_ES1:
|
||||
case OMAPDSS_VER_OMAP4430_ES2:
|
||||
case OMAPDSS_VER_OMAP4:
|
||||
src = &omap44xx_dispc_feats;
|
||||
break;
|
||||
return &omap44xx_dispc_feats;
|
||||
|
||||
case OMAPDSS_VER_OMAP5:
|
||||
case OMAPDSS_VER_DRA7xx:
|
||||
src = &omap54xx_dispc_feats;
|
||||
break;
|
||||
return &omap54xx_dispc_feats;
|
||||
|
||||
default:
|
||||
return -ENODEV;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memcpy(dst, src, sizeof(*dst));
|
||||
dispc.feat = dst;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static irqreturn_t dispc_irq_handler(int irq, void *arg)
|
||||
@ -4078,9 +4059,9 @@ static int dispc_bind(struct device *dev, struct device *master, void *data)
|
||||
|
||||
spin_lock_init(&dispc.control_lock);
|
||||
|
||||
r = dispc_init_features(dispc.pdev);
|
||||
if (r)
|
||||
return r;
|
||||
dispc.feat = dispc_get_features();
|
||||
if (!dispc.feat)
|
||||
return -ENODEV;
|
||||
|
||||
dispc_mem = platform_get_resource(dispc.pdev, IORESOURCE_MEM, 0);
|
||||
if (!dispc_mem) {
|
||||
|
@ -887,58 +887,37 @@ static const struct dss_features dra7xx_dss_feats = {
|
||||
.num_ports = ARRAY_SIZE(dra7xx_ports),
|
||||
};
|
||||
|
||||
static int dss_init_features(struct platform_device *pdev)
|
||||
static const struct dss_features *dss_get_features(void)
|
||||
{
|
||||
const struct dss_features *src;
|
||||
struct dss_features *dst;
|
||||
|
||||
dst = devm_kzalloc(&pdev->dev, sizeof(*dst), GFP_KERNEL);
|
||||
if (!dst) {
|
||||
dev_err(&pdev->dev, "Failed to allocate local DSS Features\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
switch (omapdss_get_version()) {
|
||||
case OMAPDSS_VER_OMAP24xx:
|
||||
src = &omap24xx_dss_feats;
|
||||
break;
|
||||
return &omap24xx_dss_feats;
|
||||
|
||||
case OMAPDSS_VER_OMAP34xx_ES1:
|
||||
case OMAPDSS_VER_OMAP34xx_ES3:
|
||||
case OMAPDSS_VER_AM35xx:
|
||||
src = &omap34xx_dss_feats;
|
||||
break;
|
||||
return &omap34xx_dss_feats;
|
||||
|
||||
case OMAPDSS_VER_OMAP3630:
|
||||
src = &omap3630_dss_feats;
|
||||
break;
|
||||
return &omap3630_dss_feats;
|
||||
|
||||
case OMAPDSS_VER_OMAP4430_ES1:
|
||||
case OMAPDSS_VER_OMAP4430_ES2:
|
||||
case OMAPDSS_VER_OMAP4:
|
||||
src = &omap44xx_dss_feats;
|
||||
break;
|
||||
return &omap44xx_dss_feats;
|
||||
|
||||
case OMAPDSS_VER_OMAP5:
|
||||
src = &omap54xx_dss_feats;
|
||||
break;
|
||||
return &omap54xx_dss_feats;
|
||||
|
||||
case OMAPDSS_VER_AM43xx:
|
||||
src = &am43xx_dss_feats;
|
||||
break;
|
||||
return &am43xx_dss_feats;
|
||||
|
||||
case OMAPDSS_VER_DRA7xx:
|
||||
src = &dra7xx_dss_feats;
|
||||
break;
|
||||
return &dra7xx_dss_feats;
|
||||
|
||||
default:
|
||||
return -ENODEV;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memcpy(dst, src, sizeof(*dst));
|
||||
dss.feat = dst;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void dss_uninit_ports(struct platform_device *pdev);
|
||||
@ -1104,9 +1083,9 @@ static int dss_bind(struct device *dev)
|
||||
|
||||
dss.pdev = pdev;
|
||||
|
||||
r = dss_init_features(dss.pdev);
|
||||
if (r)
|
||||
return r;
|
||||
dss.feat = dss_get_features();
|
||||
if (!dss.feat)
|
||||
return -ENODEV;
|
||||
|
||||
dss_mem = platform_get_resource(dss.pdev, IORESOURCE_MEM, 0);
|
||||
if (!dss_mem) {
|
||||
|
@ -673,10 +673,7 @@ static int hdmi_audio_register(struct device *dev)
|
||||
dev, "omap-hdmi-audio", PLATFORM_DEVID_AUTO,
|
||||
&pdata, sizeof(pdata));
|
||||
|
||||
if (IS_ERR(hdmi.audio_pdev))
|
||||
return PTR_ERR(hdmi.audio_pdev);
|
||||
|
||||
return 0;
|
||||
return PTR_ERR_OR_ZERO(hdmi.audio_pdev);
|
||||
}
|
||||
|
||||
/* HDMI HW IP initialisation */
|
||||
|
@ -189,47 +189,30 @@ static const struct hdmi_phy_features omap54xx_phy_feats = {
|
||||
.max_phy = 186000000,
|
||||
};
|
||||
|
||||
static int hdmi_phy_init_features(struct platform_device *pdev)
|
||||
static const struct hdmi_phy_features *hdmi_phy_get_features(void)
|
||||
{
|
||||
struct hdmi_phy_features *dst;
|
||||
const struct hdmi_phy_features *src;
|
||||
|
||||
dst = devm_kzalloc(&pdev->dev, sizeof(*dst), GFP_KERNEL);
|
||||
if (!dst) {
|
||||
dev_err(&pdev->dev, "Failed to allocate HDMI PHY Features\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
switch (omapdss_get_version()) {
|
||||
case OMAPDSS_VER_OMAP4430_ES1:
|
||||
case OMAPDSS_VER_OMAP4430_ES2:
|
||||
case OMAPDSS_VER_OMAP4:
|
||||
src = &omap44xx_phy_feats;
|
||||
break;
|
||||
return &omap44xx_phy_feats;
|
||||
|
||||
case OMAPDSS_VER_OMAP5:
|
||||
case OMAPDSS_VER_DRA7xx:
|
||||
src = &omap54xx_phy_feats;
|
||||
break;
|
||||
return &omap54xx_phy_feats;
|
||||
|
||||
default:
|
||||
return -ENODEV;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memcpy(dst, src, sizeof(*dst));
|
||||
phy_feat = dst;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int hdmi_phy_init(struct platform_device *pdev, struct hdmi_phy_data *phy)
|
||||
{
|
||||
int r;
|
||||
struct resource *res;
|
||||
|
||||
r = hdmi_phy_init_features(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
phy_feat = hdmi_phy_get_features();
|
||||
if (!phy_feat)
|
||||
return -ENODEV;
|
||||
|
||||
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "phy");
|
||||
if (!res) {
|
||||
|
@ -104,7 +104,7 @@ struct pxa3xx_gcu_priv {
|
||||
wait_queue_head_t wait_idle;
|
||||
wait_queue_head_t wait_free;
|
||||
spinlock_t spinlock;
|
||||
struct timeval base_time;
|
||||
struct timespec64 base_time;
|
||||
|
||||
struct pxa3xx_gcu_batch *free;
|
||||
struct pxa3xx_gcu_batch *ready;
|
||||
@ -126,18 +126,20 @@ gc_writel(struct pxa3xx_gcu_priv *priv, unsigned int off, unsigned long val)
|
||||
|
||||
#define QPRINT(priv, level, msg) \
|
||||
do { \
|
||||
struct timeval tv; \
|
||||
struct timespec64 ts; \
|
||||
struct pxa3xx_gcu_shared *shared = priv->shared; \
|
||||
u32 base = gc_readl(priv, REG_GCRBBR); \
|
||||
\
|
||||
do_gettimeofday(&tv); \
|
||||
ktime_get_ts64(&ts); \
|
||||
ts = timespec64_sub(ts, priv->base_time); \
|
||||
\
|
||||
printk(level "%ld.%03ld.%03ld - %-17s: %-21s (%s, " \
|
||||
printk(level "%lld.%03ld.%03ld - %-17s: %-21s (%s, " \
|
||||
"STATUS " \
|
||||
"0x%02lx, B 0x%08lx [%ld], E %5ld, H %5ld, " \
|
||||
"T %5ld)\n", \
|
||||
tv.tv_sec - priv->base_time.tv_sec, \
|
||||
tv.tv_usec / 1000, tv.tv_usec % 1000, \
|
||||
(s64)(ts.tv_sec), \
|
||||
ts.tv_nsec / NSEC_PER_MSEC, \
|
||||
(ts.tv_nsec % NSEC_PER_MSEC) / USEC_PER_MSEC, \
|
||||
__func__, msg, \
|
||||
shared->hw_running ? "running" : " idle", \
|
||||
gc_readl(priv, REG_GCISCR), \
|
||||
@ -164,7 +166,7 @@ pxa3xx_gcu_reset(struct pxa3xx_gcu_priv *priv)
|
||||
priv->shared->buffer_phys = priv->shared_phys;
|
||||
priv->shared->magic = PXA3XX_GCU_SHARED_MAGIC;
|
||||
|
||||
do_gettimeofday(&priv->base_time);
|
||||
ktime_get_ts64(&priv->base_time);
|
||||
|
||||
/* set up the ring buffer pointers */
|
||||
gc_writel(priv, REG_GCRBLR, 0);
|
||||
|
@ -1086,8 +1086,7 @@ static int ufx_ops_open(struct fb_info *info, int user)
|
||||
|
||||
struct fb_deferred_io *fbdefio;
|
||||
|
||||
fbdefio = kzalloc(sizeof(struct fb_deferred_io), GFP_KERNEL);
|
||||
|
||||
fbdefio = kzalloc(sizeof(*fbdefio), GFP_KERNEL);
|
||||
if (fbdefio) {
|
||||
fbdefio->delay = UFX_DEFIO_WRITE_DELAY;
|
||||
fbdefio->deferred_io = ufx_dpy_deferred_io;
|
||||
@ -1875,7 +1874,7 @@ static int ufx_alloc_urb_list(struct ufx_data *dev, int count, size_t size)
|
||||
INIT_LIST_HEAD(&dev->urbs.list);
|
||||
|
||||
while (i < count) {
|
||||
unode = kzalloc(sizeof(struct urb_node), GFP_KERNEL);
|
||||
unode = kzalloc(sizeof(*unode), GFP_KERNEL);
|
||||
if (!unode)
|
||||
break;
|
||||
unode->dev = dev;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -239,8 +239,23 @@ static int vfb_check_var(struct fb_var_screeninfo *var,
|
||||
*/
|
||||
static int vfb_set_par(struct fb_info *info)
|
||||
{
|
||||
switch (info->var.bits_per_pixel) {
|
||||
case 1:
|
||||
info->fix.visual = FB_VISUAL_MONO01;
|
||||
break;
|
||||
case 8:
|
||||
info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
|
||||
break;
|
||||
case 16:
|
||||
case 24:
|
||||
case 32:
|
||||
info->fix.visual = FB_VISUAL_TRUECOLOR;
|
||||
break;
|
||||
}
|
||||
|
||||
info->fix.line_length = get_line_length(info->var.xres_virtual,
|
||||
info->var.bits_per_pixel);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -450,6 +465,8 @@ static int vfb_probe(struct platform_device *dev)
|
||||
goto err2;
|
||||
platform_set_drvdata(dev, info);
|
||||
|
||||
vfb_set_par(info);
|
||||
|
||||
fb_info(info, "Virtual frame buffer device, using %ldK of video memory\n",
|
||||
videomemorysize >> 10);
|
||||
return 0;
|
||||
|
@ -1055,7 +1055,6 @@ static void vga16fb_copyarea(struct fb_info *info, const struct fb_copyarea *are
|
||||
case FB_TYPE_VGA_PLANES:
|
||||
if (info->fix.type_aux == FB_AUX_VGA_PLANES_VGA4) {
|
||||
width = width/8;
|
||||
height = height;
|
||||
line_ofs = info->fix.line_length - width;
|
||||
|
||||
setmode(1);
|
||||
|
@ -289,10 +289,8 @@ static int vt8500lcd_probe(struct platform_device *pdev)
|
||||
|
||||
fbi = devm_kzalloc(&pdev->dev, sizeof(struct vt8500lcd_info)
|
||||
+ sizeof(u32) * 16, GFP_KERNEL);
|
||||
if (!fbi) {
|
||||
dev_err(&pdev->dev, "Failed to initialize framebuffer device\n");
|
||||
if (!fbi)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
strcpy(fbi->fb.fix.id, "VT8500 LCD");
|
||||
|
||||
|
@ -276,10 +276,8 @@ static int wm8505fb_probe(struct platform_device *pdev)
|
||||
|
||||
fbi = devm_kzalloc(&pdev->dev, sizeof(struct wm8505fb_info) +
|
||||
sizeof(u32) * 16, GFP_KERNEL);
|
||||
if (!fbi) {
|
||||
dev_err(&pdev->dev, "Failed to initialize framebuffer device\n");
|
||||
if (!fbi)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
strcpy(fbi->fb.fix.id, DRIVER_NAME);
|
||||
|
||||
|
@ -569,7 +569,10 @@ static inline struct apertures_struct *alloc_apertures(unsigned int max_num) {
|
||||
#define fb_memcpy_fromfb sbus_memcpy_fromio
|
||||
#define fb_memcpy_tofb sbus_memcpy_toio
|
||||
|
||||
#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || defined(__sh__) || defined(__powerpc__) || defined(__avr32__) || defined(__bfin__) || defined(__arm__)
|
||||
#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || \
|
||||
defined(__hppa__) || defined(__sh__) || defined(__powerpc__) || \
|
||||
defined(__avr32__) || defined(__bfin__) || defined(__arm__) || \
|
||||
defined(__aarch64__)
|
||||
|
||||
#define fb_readb __raw_readb
|
||||
#define fb_readw __raw_readw
|
||||
|
@ -19,7 +19,7 @@ struct dloarea {
|
||||
|
||||
struct urb_node {
|
||||
struct list_head entry;
|
||||
struct dlfb_data *dev;
|
||||
struct dlfb_data *dlfb;
|
||||
struct delayed_work release_urb_work;
|
||||
struct urb *urb;
|
||||
};
|
||||
@ -35,7 +35,6 @@ struct urb_list {
|
||||
|
||||
struct dlfb_data {
|
||||
struct usb_device *udev;
|
||||
struct device *gdev; /* &udev->dev */
|
||||
struct fb_info *info;
|
||||
struct urb_list urbs;
|
||||
struct kref kref;
|
||||
|
Loading…
Reference in New Issue
Block a user