Skip to content

Commit

Permalink
Merge tag 'topic/core-stuff-2014-07-18' of git://anongit.freedesktop.…
Browse files Browse the repository at this point in the history
…org/drm-intel into drm-next

misc core patches.

* tag 'topic/core-stuff-2014-07-18' of git://anongit.freedesktop.org/drm-intel:
  drm: Check for connection_mutex in drm_select_eld
  drm/dp-mst-helper: Don't use uninitialized fields of the sideband message header
  drm/dp-mst-helper: Avoid reading uninitialized value
  drm/plane-helper: Use proper plane init function
  drivers/gpu/drm/drm_buffer.c: remove unnecessary null test before kfree
  drm: Fix function names in kerneldoc
  • Loading branch information
Dave Airlie committed Jul 19, 2014
2 parents c51f716 + 008f404 commit 322c1c0
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
6 changes: 1 addition & 5 deletions drivers/gpu/drm/drm_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,7 @@ int drm_buffer_alloc(struct drm_buffer **buf, int size)

error_out:

/* Only last element can be null pointer so check for it first. */
if ((*buf)->data[idx])
kfree((*buf)->data[idx]);

for (--idx; idx >= 0; --idx)
for (; idx >= 0; --idx)
kfree((*buf)->data[idx]);

kfree(*buf);
Expand Down
6 changes: 3 additions & 3 deletions drivers/gpu/drm/drm_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3388,7 +3388,7 @@ struct drm_property *drm_property_create(struct drm_device *dev, int flags,
EXPORT_SYMBOL(drm_property_create);

/**
* drm_property_create - create a new enumeration property type
* drm_property_create_enum - create a new enumeration property type
* @dev: drm device
* @flags: flags specifying the property type
* @name: name of the property
Expand Down Expand Up @@ -3434,7 +3434,7 @@ struct drm_property *drm_property_create_enum(struct drm_device *dev, int flags,
EXPORT_SYMBOL(drm_property_create_enum);

/**
* drm_property_create - create a new bitmask property type
* drm_property_create_bitmask - create a new bitmask property type
* @dev: drm device
* @flags: flags specifying the property type
* @name: name of the property
Expand Down Expand Up @@ -3496,7 +3496,7 @@ static struct drm_property *property_create_range(struct drm_device *dev,
}

/**
* drm_property_create - create a new ranged property type
* drm_property_create_range - create a new ranged property type
* @dev: drm device
* @flags: flags specifying the property type
* @name: name of the property
Expand Down
4 changes: 3 additions & 1 deletion drivers/gpu/drm/drm_dp_mst_topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -1290,6 +1290,8 @@ static int process_single_tx_qlock(struct drm_dp_mst_topology_mgr *mgr,
int len, space, idx, tosend;
int ret;

memset(&hdr, 0, sizeof(struct drm_dp_sideband_msg_hdr));

if (txmsg->state == DRM_DP_SIDEBAND_TX_QUEUED) {
txmsg->seqno = -1;
txmsg->state = DRM_DP_SIDEBAND_TX_START_SEND;
Expand Down Expand Up @@ -1644,7 +1646,7 @@ int drm_dp_update_payload_part2(struct drm_dp_mst_topology_mgr *mgr)
{
struct drm_dp_mst_port *port;
int i;
int ret;
int ret = 0;
mutex_lock(&mgr->payload_lock);
for (i = 0; i < mgr->max_payloads; i++) {

Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/drm_edid.c
Original file line number Diff line number Diff line change
Expand Up @@ -3305,6 +3305,7 @@ struct drm_connector *drm_select_eld(struct drm_encoder *encoder,
struct drm_device *dev = encoder->dev;

WARN_ON(!mutex_is_locked(&dev->mode_config.mutex));
WARN_ON(!drm_modeset_is_locked(&dev->mode_config.connection_mutex));

list_for_each_entry(connector, &dev->mode_config.connector_list, head)
if (connector->encoder == encoder && connector->eld[0])
Expand Down
7 changes: 4 additions & 3 deletions drivers/gpu/drm/drm_plane_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,10 @@ struct drm_plane *drm_primary_helper_create_plane(struct drm_device *dev,
}

/* possible_crtc's will be filled in later by crtc_init */
ret = drm_plane_init(dev, primary, 0, &drm_primary_helper_funcs,
formats, num_formats,
DRM_PLANE_TYPE_PRIMARY);
ret = drm_universal_plane_init(dev, primary, 0,
&drm_primary_helper_funcs,
formats, num_formats,
DRM_PLANE_TYPE_PRIMARY);
if (ret) {
kfree(primary);
primary = NULL;
Expand Down

0 comments on commit 322c1c0

Please sign in to comment.