Skip to content

Commit

Permalink
Updated kernel-headers
Browse files Browse the repository at this point in the history
Enable Vsync
  • Loading branch information
Tiziano Carotti committed Jan 28, 2013
1 parent 4ed904c commit d0c7b44
Show file tree
Hide file tree
Showing 8 changed files with 161 additions and 7 deletions.
2 changes: 1 addition & 1 deletion BoardConfig.mk
Expand Up @@ -96,7 +96,7 @@ BOARD_EGL_CFG := device/samsung/ariesve/config/egl.cfg

USE_OPENGL_RENDERER := true

TARGET_NO_HW_VSYNC := true
TARGET_NO_HW_VSYNC := false
TARGET_USES_C2D_COMPOSITION := true

# QCOM webkit
Expand Down
103 changes: 103 additions & 0 deletions include/linux/android_pmem.h
Expand Up @@ -81,6 +81,109 @@ struct pmem_allocation {
unsigned int align;
};

#ifdef __KERNEL__
int get_pmem_file(unsigned int fd, unsigned long *start, unsigned long *vstart,
unsigned long *end, struct file **filp);
int get_pmem_fd(int fd, unsigned long *start, unsigned long *end);
int get_pmem_user_addr(struct file *file, unsigned long *start,
unsigned long *end);
void put_pmem_file(struct file* file);
void put_pmem_fd(int fd);
void flush_pmem_fd(int fd, unsigned long start, unsigned long len);
void flush_pmem_file(struct file *file, unsigned long start, unsigned long len);
int pmem_cache_maint(struct file *file, unsigned int cmd,
struct pmem_addr *pmem_addr);

enum pmem_allocator_type {
/* Zero is a default in platform PMEM structures in the board files,
* when the "allocator_type" structure element is not explicitly
* defined
*/
PMEM_ALLOCATORTYPE_BITMAP = 0, /* forced to be zero here */
PMEM_ALLOCATORTYPE_SYSTEM,

PMEM_ALLOCATORTYPE_ALLORNOTHING,
PMEM_ALLOCATORTYPE_BUDDYBESTFIT,

PMEM_ALLOCATORTYPE_MAX,
};

#define PMEM_MEMTYPE_MASK 0x7
#define PMEM_INVALID_MEMTYPE 0x0
#define PMEM_MEMTYPE_EBI1 0x1
#define PMEM_MEMTYPE_SMI 0x2
#define PMEM_MEMTYPE_RESERVED_INVALID2 0x3
#define PMEM_MEMTYPE_RESERVED_INVALID3 0x4
#define PMEM_MEMTYPE_RESERVED_INVALID4 0x5
#define PMEM_MEMTYPE_RESERVED_INVALID5 0x6
#define PMEM_MEMTYPE_RESERVED_INVALID6 0x7

#define PMEM_ALIGNMENT_MASK 0x18
#define PMEM_ALIGNMENT_RESERVED_INVALID1 0x0
#define PMEM_ALIGNMENT_4K 0x8 /* the default */
#define PMEM_ALIGNMENT_1M 0x10
#define PMEM_ALIGNMENT_RESERVED_INVALID2 0x18

/* flags in the following function defined as above. */
int32_t pmem_kalloc(const size_t size, const uint32_t flags);
int32_t pmem_kfree(const int32_t physaddr);

/* kernel api names for board specific data structures */
#define PMEM_KERNEL_EBI1_DATA_NAME "pmem_kernel_ebi1"
#define PMEM_KERNEL_SMI_DATA_NAME "pmem_kernel_smi"

struct android_pmem_platform_data
{
const char* name;
/* size of memory region */
unsigned long size;

enum pmem_allocator_type allocator_type;
/* treated as a 'hidden' variable in the board files. Can be
* set, but default is the system init value of 0 which becomes a
* quantum of 4K pages.
*/
unsigned int quantum;

/* set to indicate maps of this region should be cached, if a mix of
* cached and uncached is desired, set this and open the device with
* O_SYNC to get an uncached region */
unsigned cached;
/* The MSM7k has bits to enable a write buffer in the bus controller*/
unsigned buffered;
/* which memory type (i.e. SMI, EBI1) this PMEM device is backed by */
unsigned memory_type;
/*
* function to be called when the number of allocations goes from
* 0 -> 1
*/
int (*request_region)(void *);
/*
* function to be called when the number of allocations goes from
* 1 -> 0
*/
int (*release_region)(void *);
/*
* function to be called upon pmem registration
*/
void *(*setup_region)(void);
/*
* indicates that this region should be mapped/unmaped as needed
*/
int map_on_demand;
/*
* indicates this pmem may be reused via fmem
*/
int reusable;
};

int pmem_setup(struct android_pmem_platform_data *pdata,
long (*ioctl)(struct file *, unsigned int, unsigned long),
int (*release)(struct inode *, struct file *));

int pmem_remap(struct pmem_region *region, struct file *file,
unsigned operation);
#endif /* __KERNEL__ */

#endif //_ANDROID_PPP_H_

16 changes: 16 additions & 0 deletions include/linux/genlock.h
@@ -1,6 +1,22 @@
#ifndef _GENLOCK_H_
#define _GENLOCK_H_

#ifdef __KERNEL__

struct genlock;
struct genlock_handle;

struct genlock_handle *genlock_get_handle(void);
struct genlock_handle *genlock_get_handle_fd(int fd);
void genlock_put_handle(struct genlock_handle *handle);
struct genlock *genlock_create_lock(struct genlock_handle *);
struct genlock *genlock_attach_lock(struct genlock_handle *, int fd);
int genlock_wait(struct genlock_handle *handle, u32 timeout);
/* genlock_release_lock was deprecated */
int genlock_lock(struct genlock_handle *handle, int op, int flags,
u32 timeout);
#endif

#define GENLOCK_UNLOCK 0
#define GENLOCK_WRLOCK 1
#define GENLOCK_RDLOCK 2
Expand Down
1 change: 1 addition & 0 deletions include/linux/msm_audio.h
@@ -1,6 +1,7 @@
/* include/linux/msm_audio.h
*
* Copyright (C) 2008 Google, Inc.
* Copyright (c) 2012 Code Aurora Forum. All rights reserved.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
Expand Down
1 change: 0 additions & 1 deletion include/linux/msm_kgsl.h
Expand Up @@ -157,7 +157,6 @@ struct kgsl_device_platform_data {
int num_levels;
int (*set_grp_async)(void);
unsigned int idle_timeout;
bool strtstp_sleepwake;
unsigned int nap_allowed;
unsigned int clk_map;
unsigned int idle_needed;
Expand Down
34 changes: 32 additions & 2 deletions include/linux/msm_mdp.h
Expand Up @@ -32,8 +32,11 @@
#define MSMFB_OVERLAY_SET _IOWR(MSMFB_IOCTL_MAGIC, 135, \
struct mdp_overlay)
#define MSMFB_OVERLAY_UNSET _IOW(MSMFB_IOCTL_MAGIC, 136, unsigned int)

#define MSMFB_OVERLAY_PLAY _IOW(MSMFB_IOCTL_MAGIC, 137, \
struct msmfb_overlay_data)
#define MSMFB_OVERLAY_QUEUE MSMFB_OVERLAY_PLAY

#define MSMFB_GET_PAGE_PROTECTION _IOR(MSMFB_IOCTL_MAGIC, 138, \
struct mdp_page_protection)
#define MSMFB_SET_PAGE_PROTECTION _IOW(MSMFB_IOCTL_MAGIC, 139, \
Expand Down Expand Up @@ -66,6 +69,10 @@
#define MSMFB_WRITEBACK_TERMINATE _IO(MSMFB_IOCTL_MAGIC, 155)
#define MSMFB_MDP_PP _IOWR(MSMFB_IOCTL_MAGIC, 156, struct msmfb_mdp_pp)

#define MSMFB_OVERLAY_VSYNC_CTRL _IOW(MSMFB_IOCTL_MAGIC, 160, unsigned int)
#define MSMFB_VSYNC_CTRL _IOW(MSMFB_IOCTL_MAGIC, 161, unsigned int)

#define MSMFB_METADATA_SET _IOW(MSMFB_IOCTL_MAGIC, 162, struct msmfb_metadata)
#define FB_TYPE_3D_PANEL 0x10101010
#define MDP_IMGTYPE2_START 0x10000
#define MSMFB_DRIVER_VERSION 0xF9E8D701
Expand Down Expand Up @@ -96,7 +103,10 @@ enum {
MDP_Y_CB_CR_H2V2, /* Y, Cb and Cr, planar */
MDP_Y_CRCB_H1V1, /* Y and CrCb, pseduo planer w/ Cr is in MSB */
MDP_Y_CBCR_H1V1, /* Y and CbCr, pseduo planer w/ Cb is in MSB */
MDP_YCRCB_H1V1, /* YCrCb interleave */
MDP_YCBCR_H1V1, /* YCbCr interleave */
MDP_IMGTYPE_LIMIT,
MDP_RGB_BORDERFILL, /* border fill pipe */
MDP_BGR_565 = MDP_IMGTYPE2_START, /* BGR 565 planer */
MDP_FB_FORMAT, /* framebuffer format */
MDP_IMGTYPE_LIMIT2 /* Non valid image type after this enum */
Expand Down Expand Up @@ -125,6 +135,7 @@ enum {
#define MDP_DITHER 0x8
#define MDP_BLUR 0x10
#define MDP_BLEND_FG_PREMULT 0x20000
#define MDP_IS_FG 0x40000
#define MDP_DEINTERLACE 0x80000000
#define MDP_SHARPENING 0x40000000
#define MDP_NO_DMA_BARRIER_START 0x20000000
Expand Down Expand Up @@ -326,6 +337,7 @@ enum {
MDP_BLOCK_DMA_P,
MDP_BLOCK_DMA_S,
MDP_BLOCK_DMA_E,
MDP_BLOCK_OVERLAY_2,
MDP_BLOCK_MAX,
};

Expand Down Expand Up @@ -388,14 +400,16 @@ struct mdp_csc_cfg_data {
struct mdp_csc_cfg csc_data;
};

#define MDP_PP_OPS_READ 0x2
#define MDP_PP_OPS_WRITE 0x4

enum {
mdp_lut_igc,
mdp_lut_pgc,
mdp_lut_hist,
mdp_lut_max,
};


struct mdp_igc_lut_data {
uint32_t block;
uint32_t len, ops;
Expand Down Expand Up @@ -428,7 +442,6 @@ struct mdp_hist_lut_data {
uint32_t *data;
};


struct mdp_lut_cfg_data {
uint32_t lut_type;
union {
Expand Down Expand Up @@ -465,6 +478,23 @@ struct msmfb_mdp_pp {
} data;
};

enum {
metadata_op_none,
metadata_op_base_blend,
metadata_op_max
};

struct mdp_blend_cfg {
uint32_t is_premultiplied;
};

struct msmfb_metadata {
uint32_t op;
uint32_t flags;
union {
struct mdp_blend_cfg blend_cfg;
} data;
};

struct mdp_page_protection {
uint32_t page_protection;
Expand Down
1 change: 1 addition & 0 deletions include/linux/msm_rotator.h
Expand Up @@ -31,6 +31,7 @@ struct msm_rotator_img_info {
unsigned char rotations;
int enable;
unsigned int downscale_ratio;
unsigned int secure;
};

struct msm_rotator_data_info {
Expand Down
10 changes: 7 additions & 3 deletions include/linux/msm_vidc_dec.h
Expand Up @@ -207,9 +207,6 @@ struct vdec_ioctl_msg {
#define VDEC_IOCTL_GET_DISABLE_DMX_SUPPORT \
_IOR(VDEC_IOCTL_MAGIC, 37, struct vdec_ioctl_msg)

#define VDEC_IOCTL_SET_PERF_CLK \
_IOR(VDEC_IOCTL_MAGIC, 38, struct vdec_ioctl_msg)

enum vdec_picture {
PICTURE_TYPE_I,
PICTURE_TYPE_P,
Expand Down Expand Up @@ -517,6 +514,12 @@ struct vdec_framesize {
uint32_t bottom;
};

struct vdec_aspectratioinfo {
uint32_t aspect_ratio;
uint32_t par_width;
uint32_t par_height;
};

struct vdec_output_frameinfo {
void __user *bufferaddr;
size_t offset;
Expand All @@ -528,6 +531,7 @@ struct vdec_output_frameinfo {
void *input_frame_clientdata;
struct vdec_framesize framesize;
enum vdec_interlaced_format interlaced_format;
struct vdec_aspectratioinfo aspect_ratio_info;
};

union vdec_msgdata {
Expand Down

1 comment on commit d0c7b44

@hahnjo
Copy link

@hahnjo hahnjo commented on d0c7b44 Jan 28, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could have also used my work: #4

Please sign in to comment.