diff options
author | Gowtham Tammana <g-tammana@ti.com> | 2018-01-19 17:57:25 -0600 |
---|---|---|
committer | Gowtham Tammana <g-tammana@ti.com> | 2018-01-19 17:57:25 -0600 |
commit | 4960a2dec45964011a59ca492e7fd52723713f52 (patch) | |
tree | 07726a09e205b0bb6be261ea5736520c59f27860 | |
parent | df6aa3b3034dda99203a52ee87f681453a661480 (diff) | |
download | dra7xx-4960a2dec45964011a59ca492e7fd52723713f52.tar.gz |
hwc: Clean up all unused code
Remove all unused declarations and macros.
Change-Id: Ic3c9751f6053caba69ba1445a414dc80e69f93f5
Signed-off-by: Gowtham Tammana <g-tammana@ti.com>
-rw-r--r-- | hwcomposer/display.c | 14 | ||||
-rw-r--r-- | hwcomposer/display.h | 10 | ||||
-rw-r--r-- | hwcomposer/hwc.c | 16 | ||||
-rw-r--r-- | hwcomposer/hwc_dev.h | 8 | ||||
-rw-r--r-- | hwcomposer/layer.c | 2 |
5 files changed, 2 insertions, 48 deletions
diff --git a/hwcomposer/display.c b/hwcomposer/display.c index b91277d..a4a8857 100644 --- a/hwcomposer/display.c +++ b/hwcomposer/display.c @@ -46,7 +46,6 @@ #define HDMI_DISPLAY_DEFAULT_DPI 75 #define MAX_DISPLAY_ID (MAX_DISPLAYS - 1) -#define INCH_TO_MM 25.4f /* Used by property settings */ enum { @@ -383,8 +382,6 @@ static void free_display(display_t *display) if (display) { if (display->configs) free(display->configs); - if (display->composition.buffers) - free(display->composition.buffers); display_free_dummy_fb(display); @@ -435,15 +432,6 @@ static int allocate_display(size_t display_data_size, uint32_t max_configs, disp memset(display->configs, 0, config_data_size); - /* Allocate the maximum buffers that we can receive from HWC */ - display->composition.buffers = malloc(sizeof(buffer_handle_t) * MAX_COMPOSITION_BUFFERS); - if (!display->composition.buffers) { - err = -ENOMEM; - goto err_out; - } - - memset(display->composition.buffers, 0, sizeof(buffer_handle_t) * MAX_COMPOSITION_BUFFERS); - err_out: if (err) { @@ -885,7 +873,6 @@ int init_primary_display(omap_hwc_device_t *hwc_dev) display->disp_link.ctx = hwc_dev; display->role = DISP_ROLE_PRIMARY; display->opmode = DISP_MODE_PRESENTATION; - display->mgr_ix = 0; display->blanked = true; n = display_init_dummy_fb(display); @@ -1463,7 +1450,6 @@ int add_external_hdmi_display(omap_hwc_device_t *hwc_dev) display->role = DISP_ROLE_EXTERNAL; display->opmode = DISP_MODE_PRESENTATION; display->type = DISP_TYPE_HDMI; - display->mgr_ix = 1; display->blanked = true; display_assign_pipes_for_composition(display, HWC_DISPLAY_EXTERNAL); diff --git a/hwcomposer/display.h b/hwcomposer/display.h index 3c76bb4..c526798 100644 --- a/hwcomposer/display.h +++ b/hwcomposer/display.h @@ -25,15 +25,13 @@ #include "layer.h" #include "timeline.h" -#include "drm_fourcc.h" #include "xf86drm.h" #include "xf86drmMode.h" #define MAX_DISPLAYS 4 #define MAX_DISPLAY_CONFIGS 32 -#define MAX_COMPOSITION_BUFFERS 32 -#define MAX_COMPOSITION_LAYERS MAX_COMPOSITION_BUFFERS +#define MAX_COMPOSITION_LAYERS 32 #define HWC_DISPLAY_SECONDARY HWC_DISPLAY_EXTERNAL+1 #define DSS_AVAILABLE_PIPES 4 @@ -48,8 +46,6 @@ #define HDMI_FB_WIDTH 1280 #define HDMI_FB_HEIGHT 720 -#define HWC_DRM_ZORDER_PROPERTY 7 - typedef struct omap_hwc_device omap_hwc_device_t; typedef struct dss_platform_info { @@ -65,7 +61,6 @@ typedef struct dss_platform_info { uint16_t max_height; uint8_t max_downscale; uint16_t integer_scale_ratio_limit; - uint32_t tiler1d_slot_size; }dss_platform_info_t; @@ -147,7 +142,6 @@ struct composition { bool use_dss; bool swap_rb; - uint32_t tiler1d_slot_size; uint32_t wanted_ovls; /* # of overlays required for current composition */ uint32_t avail_ovls; /* # of overlays available for current composition */ uint32_t scaling_ovls; /* # of overlays available with scaling caps */ @@ -203,8 +197,6 @@ struct display { uint32_t role; /* enum disp_role */ uint32_t opmode; /* enum disp_mode */ - uint32_t mgr_ix; - bool blanked; hwc_display_contents_1_t *contents; diff --git a/hwcomposer/hwc.c b/hwcomposer/hwc.c index 8016d36..a7f0200 100644 --- a/hwcomposer/hwc.c +++ b/hwcomposer/hwc.c @@ -854,16 +854,6 @@ static int hwc_device_open(const hw_module_t* module, const char* name, hw_devic goto done; } - /* get debug properties */ - char value[PROPERTY_VALUE_MAX]; - property_get("debug.hwc.rgb_order", value, "1"); - hwc_dev->flags_rgb_order = atoi(value); - property_get("persist.hwc.nv12_only", value, "0"); - hwc_dev->flags_nv12_only = atoi(value); - property_get("debug.hwc.idle", value, "250"); - hwc_dev->idle = atoi(value); - - if (pthread_create(&hwc_dev->hdmi_thread, NULL, hwc_hdmi_thread, hwc_dev)) { ALOGE("failed to create HDMI listening thread (%d): %m", errno); @@ -871,9 +861,7 @@ static int hwc_device_open(const hw_module_t* module, const char* name, hw_devic goto done; } - ALOGI("open_device(rgb_order=%d nv12_only=%d)", - hwc_dev->flags_rgb_order, hwc_dev->flags_nv12_only); - + char value[PROPERTY_VALUE_MAX]; property_get("persist.hwc.upscaled_nv12_limit", value, "2."); sscanf(value, "%f", &hwc_dev->upscaled_nv12_limit); if (hwc_dev->upscaled_nv12_limit < 0. || hwc_dev->upscaled_nv12_limit > 2048.) { @@ -885,8 +873,6 @@ static int hwc_device_open(const hw_module_t* module, const char* name, hw_devic ALOGI("Using older drm pageflip API to update display"); #endif - hwc_dev->tiler1d_slot_size = 32*1024*1024; //32MB - /* * open blitter device */ diff --git a/hwcomposer/hwc_dev.h b/hwcomposer/hwc_dev.h index e8c3101..0a28c87 100644 --- a/hwcomposer/hwc_dev.h +++ b/hwcomposer/hwc_dev.h @@ -47,7 +47,6 @@ struct omap_hwc_device { pthread_t hdmi_thread; pthread_t vsync_thread; - int fb_z; const hwc_procs_t *cb_procs; @@ -56,21 +55,14 @@ struct omap_hwc_device { int drm_fd; drmModeResPtr drm_resources; - int flags_rgb_order; - int flags_nv12_only; float upscaled_nv12_limit; int force_sgx; - int idle; display_t *displays[MAX_DISPLAYS]; bool ext_disp_state; bool vsync_thread_running; - int last_ext_ovls; - int last_int_ovls; - int tiler1d_slot_size; - int pipe_fds[2]; /* pipe to event thread */ int num_ovls; /* blitter */ diff --git a/hwcomposer/layer.c b/hwcomposer/layer.c index 5cf6b03..9201e70 100644 --- a/hwcomposer/layer.c +++ b/hwcomposer/layer.c @@ -159,8 +159,6 @@ bool is_composable_layer(omap_hwc_device_t *hwc_dev, int disp, const hwc_layer_1 if (!is_nv12_layer(layer)) { if (layer->transform) return false; - if ((int)get_required_mem1d_size(layer) > hwc_dev->tiler1d_slot_size) - return false; } return can_scale_layer(hwc_dev, disp, layer); |