Path: blob/master/arch/arm/mach-msm/include/mach/msm_fb.h
17602 views
/* arch/arm/mach-msm/include/mach/msm_fb.h1*2* Internal shared definitions for various MSM framebuffer parts.3*4* Copyright (C) 2007 Google Incorporated5*6* This software is licensed under the terms of the GNU General Public7* License version 2, as published by the Free Software Foundation, and8* may be copied, distributed, and modified under those terms.9*10* This program is distributed in the hope that it will be useful,11* but WITHOUT ANY WARRANTY; without even the implied warranty of12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13* GNU General Public License for more details.14*/1516#ifndef _MSM_FB_H_17#define _MSM_FB_H_1819#include <linux/device.h>2021struct mddi_info;2223struct msm_fb_data {24int xres; /* x resolution in pixels */25int yres; /* y resolution in pixels */26int width; /* disply width in mm */27int height; /* display height in mm */28unsigned output_format;29};3031struct msmfb_callback {32void (*func)(struct msmfb_callback *);33};3435enum {36MSM_MDDI_PMDH_INTERFACE,37MSM_MDDI_EMDH_INTERFACE,38MSM_EBI2_INTERFACE,39};4041#define MSMFB_CAP_PARTIAL_UPDATES (1 << 0)4243struct msm_panel_data {44/* turns off the fb memory */45int (*suspend)(struct msm_panel_data *);46/* turns on the fb memory */47int (*resume)(struct msm_panel_data *);48/* turns off the panel */49int (*blank)(struct msm_panel_data *);50/* turns on the panel */51int (*unblank)(struct msm_panel_data *);52void (*wait_vsync)(struct msm_panel_data *);53void (*request_vsync)(struct msm_panel_data *, struct msmfb_callback *);54void (*clear_vsync)(struct msm_panel_data *);55/* from the enum above */56unsigned interface_type;57/* data to be passed to the fb driver */58struct msm_fb_data *fb_data;5960/* capabilities supported by the panel */61uint32_t caps;62};6364struct msm_mddi_client_data {65void (*suspend)(struct msm_mddi_client_data *);66void (*resume)(struct msm_mddi_client_data *);67void (*activate_link)(struct msm_mddi_client_data *);68void (*remote_write)(struct msm_mddi_client_data *, uint32_t val,69uint32_t reg);70uint32_t (*remote_read)(struct msm_mddi_client_data *, uint32_t reg);71void (*auto_hibernate)(struct msm_mddi_client_data *, int);72/* custom data that needs to be passed from the board file to a73* particular client */74void *private_client_data;75struct resource *fb_resource;76/* from the list above */77unsigned interface_type;78};7980struct msm_mddi_platform_data {81unsigned int clk_rate;82void (*power_client)(struct msm_mddi_client_data *, int on);8384/* fixup the mfr name, product id */85void (*fixup)(uint16_t *mfr_name, uint16_t *product_id);8687struct resource *fb_resource; /*optional*/88/* number of clients in the list that follows */89int num_clients;90/* array of client information of clients */91struct {92unsigned product_id; /* mfr id in top 16 bits, product id93* in lower 16 bits94*/95char *name; /* the device name will be the platform96* device name registered for the client,97* it should match the name of the associated98* driver99*/100unsigned id; /* id for mddi client device node, will also101* be used as device id of panel devices, if102* the client device will have multiple panels103* space must be left here for them104*/105void *client_data; /* required private client data */106unsigned int clk_rate; /* optional: if the client requires a107* different mddi clk rate108*/109} client_platform_data[];110};111112struct mdp_blit_req;113struct fb_info;114struct mdp_device {115struct device dev;116void (*dma)(struct mdp_device *mpd, uint32_t addr,117uint32_t stride, uint32_t w, uint32_t h, uint32_t x,118uint32_t y, struct msmfb_callback *callback, int interface);119void (*dma_wait)(struct mdp_device *mdp);120int (*blit)(struct mdp_device *mdp, struct fb_info *fb,121struct mdp_blit_req *req);122void (*set_grp_disp)(struct mdp_device *mdp, uint32_t disp_id);123};124125struct class_interface;126int register_mdp_client(struct class_interface *class_intf);127128/**** private client data structs go below this line ***/129130struct msm_mddi_bridge_platform_data {131/* from board file */132int (*init)(struct msm_mddi_bridge_platform_data *,133struct msm_mddi_client_data *);134int (*uninit)(struct msm_mddi_bridge_platform_data *,135struct msm_mddi_client_data *);136/* passed to panel for use by the fb driver */137int (*blank)(struct msm_mddi_bridge_platform_data *,138struct msm_mddi_client_data *);139int (*unblank)(struct msm_mddi_bridge_platform_data *,140struct msm_mddi_client_data *);141struct msm_fb_data fb_data;142};143144145146#endif147148149