summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGowtham Tammana <g-tammana@ti.com>2017-02-21 15:44:51 -0600
committerGowtham Tammana <g-tammana@ti.com>2017-02-22 19:55:37 -0500
commit39511d082acdcb0fe65d3239646e17fa2d0b034f (patch)
tree33a74da7037bbbd1cb3b637e5fedb88f910d7cae
parent13d5bff866ec4465fb53a652bb058bf031e54183 (diff)
downloaddra7xx-39511d082acdcb0fe65d3239646e17fa2d0b034f.tar.gz
hwc: Fix uninitialized and incompatible type warnings
Fix -Wmaybe-uninitialized and incompatible pointer type warnings. Change-Id: Iec0adabdad1f59f185b612f49b9aef9495d77cec Signed-off-by: Gowtham Tammana <g-tammana@ti.com>
-rw-r--r--hwcomposer/display.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/hwcomposer/display.c b/hwcomposer/display.c
index e42c697..8d43764 100644
--- a/hwcomposer/display.c
+++ b/hwcomposer/display.c
@@ -80,7 +80,7 @@ void timeline_inc(timeline_info_t *timeline)
pthread_mutex_unlock(&timeline->lock);
}
-static int crop_plane_to_rect(struct hwc_rect vis_rect, struct drm_mode_set_plane *plane)
+static int crop_plane_to_rect(struct hwc_rect vis_rect, drm_plane_props_t *plane)
{
struct {
int xy[2];
@@ -215,7 +215,7 @@ void adjust_drm_plane_to_layer(hwc_layer_1_t const *layer, int zorder,
plane->src_h = HEIGHT(layer->sourceCrop);
plane->zorder = zorder;
- plane->layer = layer;
+ plane->layer = (hwc_layer_1_t *)layer;
if (layer->blending == HWC_BLENDING_PREMULT)
plane->pre_mult_alpha = 1;
@@ -223,7 +223,7 @@ void adjust_drm_plane_to_layer(hwc_layer_1_t const *layer, int zorder,
plane->pre_mult_alpha = 0;
}
-void adjust_drm_plane_to_display(omap_hwc_device_t *hwc_dev, int disp, struct drm_mode_set_plane *plane)
+void adjust_drm_plane_to_display(omap_hwc_device_t *hwc_dev, int disp, drm_plane_props_t *plane)
{
display_t *display = hwc_dev->displays[disp];
if (!display)
@@ -353,8 +353,8 @@ static void free_display(display_t *display)
if (display->retire_sync.timeline >= 0) {
/* increment timeline to signal any pending fences */
- timeline_inc(&display->retire_sync.timeline);
- timeline_inc(&display->retire_sync.timeline);
+ timeline_inc(&display->retire_sync);
+ timeline_inc(&display->retire_sync);
pthread_mutex_lock(&display->lock);
while (display->is_flip_pending) {
@@ -421,7 +421,7 @@ err_out:
}
-static void setup_config(display_config_t *config, int xres, int yres, struct dsscomp_display_info *info,
+static void setup_config(display_config_t *config, int xres, int yres, void *info,
int default_fps, int default_dpi)
{
UNUSED_ARG(info);
@@ -436,17 +436,17 @@ static void setup_config(display_config_t *config, int xres, int yres, struct ds
}
}
-static void setup_lcd_config(display_config_t *config, int xres, int yres, struct dsscomp_display_info *info)
+static void setup_lcd_config(display_config_t *config, int xres, int yres, void *info)
{
setup_config(config, xres, yres, info, LCD_DISPLAY_FPS, LCD_DISPLAY_DEFAULT_DPI);
}
-static void setup_hdmi_config(display_config_t *config, int xres, int yres, struct dsscomp_display_info *info)
+static void setup_hdmi_config(display_config_t *config, int xres, int yres, void *info)
{
setup_config(config, xres, yres, info, HDMI_DISPLAY_FPS, HDMI_DISPLAY_DEFAULT_DPI);
}
-static int init_primary_lcd_display(omap_hwc_device_t *hwc_dev, uint32_t xres, uint32_t yres, struct dsscomp_display_info *info)
+static int init_primary_lcd_display(omap_hwc_device_t *hwc_dev, uint32_t xres, uint32_t yres, void *info)
{
int err;
@@ -1155,8 +1155,7 @@ int update_display(omap_hwc_device_t *ctx, int disp,
if (!kdisp->con)
return 0;
- hwc_layer_1_t *target = NULL;
- target = comp->plane_info[0].layer;
+ hwc_layer_1_t *target = comp->plane_info[0].layer;
buffer_handle_t hnd;
if (ctx->blitter && ctx->displays[disp]->composition.use_blitter) {
@@ -1376,6 +1375,7 @@ int add_external_hdmi_display(omap_hwc_device_t *hwc_dev)
display->disp_link.crtc_id = hwc_dev->drm_resources->crtcs[i];
//Change the mode to PREFERRED_HDMI_RESOLUTION
+ mode = &connector->modes[0];
for (j = 0; j < connector->count_modes; j++) {
mode = &connector->modes[j];
if (!strcmp(mode->name, PREFERRED_HDMI_RESOLUTION)) {