Terence Hampson | aeb793e | 2012-05-11 11:41:16 -0400 | [diff] [blame] | 1 | /* Copyright (c) 2012, Code Aurora Forum. All rights reserved. |
| 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | * |
| 12 | */ |
| 13 | #ifndef VCAP_VP_H |
| 14 | #define VCAP_VP_H |
| 15 | |
| 16 | #include <linux/interrupt.h> |
| 17 | |
| 18 | #include <media/vcap_v4l2.h> |
| 19 | |
| 20 | #define VCAP_BASE (dev->vcapbase) |
| 21 | #define VCAP_OFFSET(off) (VCAP_BASE + off) |
| 22 | |
| 23 | #define VCAP_VP_INT_STATUS (VCAP_BASE + 0x404) |
| 24 | #define VCAP_VP_INT_CLEAR (VCAP_BASE + 0x40C) |
| 25 | |
| 26 | #define VCAP_VP_SW_RESET (VCAP_BASE + 0x410) |
| 27 | #define VCAP_VP_INTERRUPT_ENABLE (VCAP_BASE + 0x408) |
| 28 | |
| 29 | #define VCAP_VP_FILM_PROJECTION_T0 (VCAP_BASE + 0x50C) |
| 30 | #define VCAP_VP_FILM_PROJECTION_T2 (VCAP_BASE + 0x508) |
| 31 | #define VCAP_VP_FILM_PAST_MAX_PROJ (VCAP_BASE + 0x510) |
| 32 | #define VCAP_VP_FILM_PAST_MIN_PROJ (VCAP_BASE + 0x514) |
| 33 | #define VCAP_VP_FILM_SEQUENCE_HIST (VCAP_BASE + 0x504) |
| 34 | #define VCAP_VP_FILM_MODE_STATE (VCAP_BASE + 0x500) |
| 35 | |
| 36 | #define VCAP_VP_BAL_VMOTION_STATE (VCAP_BASE + 0x690) |
| 37 | #define VCAP_VP_REDUCT_AVG_MOTION (VCAP_BASE + 0x610) |
| 38 | #define VCAP_VP_REDUCT_AVG_MOTION2 (VCAP_BASE + 0x614) |
| 39 | |
| 40 | #define VCAP_VP_NR_AVG_LUMA (VCAP_BASE + 0x608) |
| 41 | #define VCAP_VP_NR_AVG_CHROMA (VCAP_BASE + 0x60C) |
| 42 | #define VCAP_VP_NR_CTRL_LUMA (VCAP_BASE + 0x600) |
| 43 | #define VCAP_VP_NR_CTRL_CHROMA (VCAP_BASE + 0x604) |
| 44 | |
| 45 | #define VCAP_VP_BAL_AVG_BLEND (VCAP_BASE + 0x694) |
| 46 | #define VCAP_VP_VMOTION_HIST (VCAP_BASE + 0x6F8) |
| 47 | |
| 48 | #define VCAP_VP_MOTION_EST_ADDR (VCAP_BASE + 0x4E0) |
| 49 | #define VCAP_VP_FILM_ANALYSIS_CONFIG (VCAP_BASE + 0x520) |
| 50 | #define VCAP_VP_FILM_STATE_CONFIG (VCAP_BASE + 0x524) |
| 51 | |
| 52 | #define VCAP_VP_FVM_CONFIG (VCAP_BASE + 0x550) |
| 53 | #define VCAP_VP_FILM_ANALYSIS_CONFIG2 (VCAP_BASE + 0x52C) |
| 54 | #define VCAP_VP_MIXED_ANALYSIS_CONFIG (VCAP_BASE + 0x530) |
| 55 | |
| 56 | #define VCAP_VP_SPATIAL_CONFIG (VCAP_BASE + 0x580) |
| 57 | #define VCAP_VP_SPATIAL_CONFIG2 (VCAP_BASE + 0x584) |
| 58 | #define VCAP_VP_SPATIAL_CONFIG3 (VCAP_BASE + 0x588) |
| 59 | #define VCAP_VP_TEMPORAL_CONFIG (VCAP_BASE + 0x5C0) |
| 60 | |
| 61 | #define VCAP_VP_PIXEL_DIFF_CONFIG (VCAP_BASE + 0x6FC) |
| 62 | #define VCAP_VP_H_FREQ_CONFIG (VCAP_BASE + 0x528) |
| 63 | #define VCAP_VP_NR_CONFIG (VCAP_BASE + 0x620) |
| 64 | #define VCAP_VP_NR_LUMA_CONFIG (VCAP_BASE + 0x624) |
| 65 | #define VCAP_VP_NR_CHROMA_CONFIG (VCAP_BASE + 0x628) |
| 66 | #define VCAP_VP_BAL_CONFIG (VCAP_BASE + 0x680) |
| 67 | #define VCAP_VP_BAL_MOTION_CONFIG (VCAP_BASE + 0x684) |
| 68 | #define VCAP_VP_BAL_LIGHT_COMB (VCAP_BASE + 0x688) |
| 69 | #define VCAP_VP_BAL_VMOTION_CONFIG (VCAP_BASE + 0x68C) |
| 70 | |
| 71 | #define VCAP_VP_NR_CONFIG2 (VCAP_BASE + 0x484) |
| 72 | #define VCAP_VP_FRAME_SIZE (VCAP_BASE + 0x48C) |
| 73 | #define VCAP_VP_SPLIT_SCRN_CTRL (VCAP_BASE + 0x750) |
| 74 | |
| 75 | #define VCAP_VP_IN_CONFIG (VCAP_BASE + 0x480) |
| 76 | #define VCAP_VP_OUT_CONFIG (VCAP_BASE + 0x488) |
| 77 | |
| 78 | #define VCAP_VP_T2_Y_BASE_ADDR (VCAP_BASE + 0x4C0) |
| 79 | #define VCAP_VP_T2_C_BASE_ADDR (VCAP_BASE + 0x4C4) |
| 80 | #define VCAP_VP_OUT_Y_BASE_ADDR (VCAP_BASE + 0x4CC) |
| 81 | #define VCAP_VP_OUT_C_BASE_ADDR (VCAP_BASE + 0x4D0) |
| 82 | #define VCAP_VP_OUT_CR_BASE_ADDR (VCAP_BASE + 0x4D4) |
| 83 | |
| 84 | #define VCAP_VP_CTRL (VCAP_BASE + 0x4D8) |
| 85 | |
| 86 | #define VCAP_VP_T1_Y_BASE_ADDR (VCAP_BASE + 0x4A8) |
| 87 | #define VCAP_VP_T1_C_BASE_ADDR (VCAP_BASE + 0x4Ac) |
| 88 | #define VCAP_VP_NR_T2_Y_BASE_ADDR (VCAP_BASE + 0x4B4) |
| 89 | #define VCAP_VP_NR_T2_C_BASE_ADDR (VCAP_BASE + 0x4B8) |
| 90 | |
| 91 | #define VP_PIC_DONE (0x1 << 0) |
| 92 | |
| 93 | irqreturn_t vp_handler(struct vcap_dev *dev); |
| 94 | int config_vp_format(struct vcap_client_data *c_data); |
| 95 | void vp_stop_capture(struct vcap_client_data *c_data); |
| 96 | int init_motion_buf(struct vcap_client_data *c_data); |
| 97 | void deinit_motion_buf(struct vcap_client_data *c_data); |
| 98 | int init_nr_buf(struct vcap_client_data *c_data); |
| 99 | void deinit_nr_buf(struct vcap_client_data *c_data); |
| 100 | int kickoff_vp(struct vcap_client_data *c_data); |
| 101 | int continue_vp(struct vcap_client_data *c_data); |
| 102 | |
| 103 | #endif |