Skip to content

Commit

Permalink
Merge branch 'gma500-next' of git://github.com/patjak/drm-gma500 into…
Browse files Browse the repository at this point in the history
… drm-next

A few fixes and cleanups for 4.7 that's been collecting dust in my
inbox for a while.

* 'gma500-next' of git://github.com/patjak/drm-gma500:
  drm/gma500/mdfld_dsi: remove bogus if check
  drm/gma500: Fix possible out of bounds read
  drm/gma500: fix double freeing
  • Loading branch information
Dave Airlie committed Apr 14, 2016
2 parents d00b39c + 7d32326 commit f9fd2ad
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
13 changes: 4 additions & 9 deletions drivers/gpu/drm/gma500/framebuffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,15 +411,15 @@ static int psbfb_create(struct psb_fbdev *fbdev,
info = drm_fb_helper_alloc_fbi(&fbdev->psb_fb_helper);
if (IS_ERR(info)) {
ret = PTR_ERR(info);
goto out_err1;
goto err_free_range;
}
info->par = fbdev;

mode_cmd.pixel_format = drm_mode_legacy_fb_format(bpp, depth);

ret = psb_framebuffer_init(dev, psbfb, &mode_cmd, backing);
if (ret)
goto out_unref;
goto err_release;

fb = &psbfb->base;
psbfb->fbdev = info;
Expand Down Expand Up @@ -464,14 +464,9 @@ static int psbfb_create(struct psb_fbdev *fbdev,
psbfb->base.width, psbfb->base.height);

return 0;
out_unref:
if (backing->stolen)
psb_gtt_free_range(dev, backing);
else
drm_gem_object_unreference_unlocked(&backing->gem);

err_release:
drm_fb_helper_release_fbi(&fbdev->psb_fb_helper);
out_err1:
err_free_range:
psb_gtt_free_range(dev, backing);
return ret;
}
Expand Down
6 changes: 1 addition & 5 deletions drivers/gpu/drm/gma500/mdfld_dsi_dpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -979,11 +979,7 @@ struct mdfld_dsi_encoder *mdfld_dsi_dpi_init(struct drm_device *dev,
return NULL;
}

if (dsi_connector->pipe)
dpi_output->panel_on = 0;
else
dpi_output->panel_on = 0;

dpi_output->panel_on = 0;
dpi_output->dev = dev;
if (mdfld_get_panel_type(dev, pipe) != TC35876X)
dpi_output->p_funcs = p_funcs;
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ static const char *const dsi_errors[] = {
"RX Prot Violation",
"HS Generic Write FIFO Full",
"LP Generic Write FIFO Full",
"Generic Read Data Avail"
"Generic Read Data Avail",
"Special Packet Sent",
"Tearing Effect",
};
Expand Down

0 comments on commit f9fd2ad

Please sign in to comment.