diff options
author | Mykola Ostrovskyy <mykola@ti.com> | 2012-12-14 12:28:36 +0200 |
---|---|---|
committer | Mykola Ostrovskyy <mykola@ti.com> | 2012-12-18 17:31:19 +0200 |
commit | 3ae8bf50923945a3994c8102685101767e8160e8 (patch) | |
tree | 0c2449ec1775d6037c87ef157431d7205d536335 /hwc/display.h | |
parent | 842c6b84a2b2e94d9fcd8145639e0653c82f7647 (diff) | |
download | hardware_ti_omap4-3ae8bf50923945a3994c8102685101767e8160e8.zip hardware_ti_omap4-3ae8bf50923945a3994c8102685101767e8160e8.tar.gz hardware_ti_omap4-3ae8bf50923945a3994c8102685101767e8160e8.tar.bz2 |
hwc: Support enumeration of display attributes
Basic implementation of HWC 1.1 callbacks for display discovery.
Only primary LCD display is supported.
Change-Id: I6c48378f520887c143b2a6e03db5b4ab7322cb71
Signed-off-by: Mykola Ostrovskyy <mykola@ti.com>
Diffstat (limited to 'hwc/display.h')
-rw-r--r-- | hwc/display.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/hwc/display.h b/hwc/display.h new file mode 100644 index 0000000..f24fc41 --- /dev/null +++ b/hwc/display.h @@ -0,0 +1,48 @@ +/* + * Copyright (C) Texas Instruments - http://www.ti.com/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __DISPLAY__ +#define __DISPLAY__ + +#include <stdint.h> + +#define MAX_DISPLAYS 3 +#define MAX_DISPLAY_CONFIGS 32 + +struct display_config { + int xres; + int yres; + int fps; + int xdpi; + int ydpi; +}; +typedef struct display_config display_config_t; + +struct display { + uint32_t num_configs; + display_config_t *configs; + uint32_t active_config_ix; +}; +typedef struct display display_t; + +typedef struct omap_hwc_device omap_hwc_device_t; + +int init_primary_display(omap_hwc_device_t *hwc_dev); +int get_display_configs(omap_hwc_device_t *hwc_dev, int disp, uint32_t *configs, size_t *numConfigs); +int get_display_attributes(omap_hwc_device_t *hwc_dev, int disp, uint32_t config, const uint32_t *attributes, int32_t *values); +void free_displays(omap_hwc_device_t *hwc_dev); + +#endif |