mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-05 03:08:15 +02:00
NV50: use list_head item instead of list_head head to avoid confusion
This commit is contained in:
parent
9f28da80f6
commit
91c742663a
11 changed files with 31 additions and 31 deletions
|
|
@ -60,7 +60,7 @@ static struct nv50_output *nv50_connector_to_output(struct nv50_connector *conne
|
|||
if (!digital_possible && digital)
|
||||
return NULL;
|
||||
|
||||
list_for_each_entry(output, &display->outputs, head) {
|
||||
list_for_each_entry(output, &display->outputs, item) {
|
||||
if (connector->bus != output->bus)
|
||||
continue;
|
||||
if (digital && output->type == OUTPUT_TMDS)
|
||||
|
|
@ -122,7 +122,7 @@ static int nv50_connector_destroy(struct nv50_connector *connector)
|
|||
if (!display || !connector)
|
||||
return -EINVAL;
|
||||
|
||||
list_del(&connector->head);
|
||||
list_del(&connector->item);
|
||||
|
||||
if (connector->i2c_chan)
|
||||
nv50_i2c_channel_destroy(connector->i2c_chan);
|
||||
|
|
@ -157,7 +157,7 @@ int nv50_connector_create(struct drm_device *dev, int bus, int i2c_index, int ty
|
|||
if (type == CONNECTOR_UNKNOWN)
|
||||
goto out;
|
||||
|
||||
list_add_tail(&connector->head, &display->connectors);
|
||||
list_add_tail(&connector->item, &display->connectors);
|
||||
|
||||
connector->bus = bus;
|
||||
connector->type = type;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
#define CONNECTOR_TV 5
|
||||
|
||||
struct nv50_connector {
|
||||
struct list_head head;
|
||||
struct list_head item;
|
||||
|
||||
struct drm_device *dev;
|
||||
int type;
|
||||
|
|
|
|||
|
|
@ -445,7 +445,7 @@ static int nv50_crtc_destroy(struct nv50_crtc *crtc)
|
|||
if (!display || !crtc)
|
||||
return -EINVAL;
|
||||
|
||||
list_del(&crtc->head);
|
||||
list_del(&crtc->item);
|
||||
|
||||
nv50_fb_destroy(crtc);
|
||||
nv50_lut_destroy(crtc);
|
||||
|
|
@ -484,7 +484,7 @@ int nv50_crtc_create(struct drm_device *dev, int index)
|
|||
goto out;
|
||||
}
|
||||
|
||||
list_add_tail(&crtc->head, &display->crtcs);
|
||||
list_add_tail(&crtc->item, &display->crtcs);
|
||||
|
||||
crtc->index = index;
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ struct nv50_lut;
|
|||
struct nv50_fb;
|
||||
|
||||
struct nv50_crtc {
|
||||
struct list_head head;
|
||||
struct list_head item;
|
||||
|
||||
struct drm_device *dev;
|
||||
int index;
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ static int nv50_dac_destroy(struct nv50_output *output)
|
|||
if (!display || !output)
|
||||
return -EINVAL;
|
||||
|
||||
list_del(&output->head);
|
||||
list_del(&output->item);
|
||||
|
||||
kfree(output->native_mode);
|
||||
if (dev_priv->free_output)
|
||||
|
|
@ -197,7 +197,7 @@ int nv50_dac_create(struct drm_device *dev, int dcb_entry)
|
|||
output->dcb_entry = dcb_entry;
|
||||
output->bus = entry->bus;
|
||||
|
||||
list_add_tail(&output->head, &display->outputs);
|
||||
list_add_tail(&output->item, &display->outputs);
|
||||
|
||||
output->native_mode = kzalloc(sizeof(struct nouveau_hw_mode), GFP_KERNEL);
|
||||
if (!output->native_mode) {
|
||||
|
|
|
|||
|
|
@ -139,14 +139,14 @@ static int nv50_display_disable(struct nv50_display *display)
|
|||
|
||||
NV50_DEBUG("\n");
|
||||
|
||||
list_for_each_entry(crtc, &display->crtcs, head) {
|
||||
list_for_each_entry(crtc, &display->crtcs, item) {
|
||||
crtc->blank(crtc, TRUE);
|
||||
}
|
||||
|
||||
display->update(display);
|
||||
|
||||
/* Almost like ack'ing a vblank interrupt, maybe in the spirit of cleaning up? */
|
||||
list_for_each_entry(crtc, &display->crtcs, head) {
|
||||
list_for_each_entry(crtc, &display->crtcs, item) {
|
||||
if (crtc->active) {
|
||||
uint32_t mask;
|
||||
|
||||
|
|
@ -305,15 +305,15 @@ int nv50_display_destroy(struct drm_device *dev)
|
|||
if (display->init_done)
|
||||
display->disable(display);
|
||||
|
||||
list_for_each_entry(connector, &display->connectors, head) {
|
||||
list_for_each_entry(connector, &display->connectors, item) {
|
||||
connector->destroy(connector);
|
||||
}
|
||||
|
||||
list_for_each_entry(output, &display->outputs, head) {
|
||||
list_for_each_entry(output, &display->outputs, item) {
|
||||
output->destroy(output);
|
||||
}
|
||||
|
||||
list_for_each_entry(crtc, &display->crtcs, head) {
|
||||
list_for_each_entry(crtc, &display->crtcs, item) {
|
||||
crtc->destroy(crtc);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -155,11 +155,11 @@ static void nv50_kms_mirror_routing(struct drm_device *dev)
|
|||
struct drm_connector *drm_connector = NULL;
|
||||
|
||||
/* Wipe all previous connections. */
|
||||
list_for_each_entry(connector, &display->connectors, head) {
|
||||
list_for_each_entry(connector, &display->connectors, item) {
|
||||
connector->output = NULL;
|
||||
}
|
||||
|
||||
list_for_each_entry(output, &display->outputs, head) {
|
||||
list_for_each_entry(output, &display->outputs, item) {
|
||||
output->crtc = NULL;
|
||||
}
|
||||
|
||||
|
|
@ -578,7 +578,7 @@ int nv50_kms_crtc_set_config(struct drm_mode_set *set)
|
|||
crtc = to_nv50_crtc(set->crtc);
|
||||
|
||||
/* disconnect unused outputs */
|
||||
list_for_each_entry(output, &display->outputs, head) {
|
||||
list_for_each_entry(output, &display->outputs, item) {
|
||||
if (output->crtc) {
|
||||
crtc_mask |= 1 << output->crtc->index;
|
||||
} else {
|
||||
|
|
@ -591,7 +591,7 @@ int nv50_kms_crtc_set_config(struct drm_mode_set *set)
|
|||
}
|
||||
|
||||
/* blank any unused crtcs */
|
||||
list_for_each_entry(crtc, &display->crtcs, head) {
|
||||
list_for_each_entry(crtc, &display->crtcs, item) {
|
||||
if (!(crtc_mask & (1 << crtc->index)))
|
||||
crtc->blank(crtc, TRUE);
|
||||
}
|
||||
|
|
@ -605,12 +605,12 @@ int nv50_kms_crtc_set_config(struct drm_mode_set *set)
|
|||
}
|
||||
|
||||
/* find native mode. */
|
||||
list_for_each_entry(output, &display->outputs, head) {
|
||||
list_for_each_entry(output, &display->outputs, item) {
|
||||
if (output->crtc != crtc)
|
||||
continue;
|
||||
|
||||
*crtc->native_mode = *output->native_mode;
|
||||
list_for_each_entry(connector, &display->connectors, head) {
|
||||
list_for_each_entry(connector, &display->connectors, item) {
|
||||
if (connector->output != output)
|
||||
continue;
|
||||
|
||||
|
|
@ -632,7 +632,7 @@ int nv50_kms_crtc_set_config(struct drm_mode_set *set)
|
|||
goto out;
|
||||
}
|
||||
|
||||
list_for_each_entry(output, &display->outputs, head) {
|
||||
list_for_each_entry(output, &display->outputs, item) {
|
||||
if (output->crtc != crtc)
|
||||
continue;
|
||||
|
||||
|
|
@ -653,7 +653,7 @@ int nv50_kms_crtc_set_config(struct drm_mode_set *set)
|
|||
display->last_crtc = crtc->index;
|
||||
|
||||
/* this is executed immediately */
|
||||
list_for_each_entry(output, &display->outputs, head) {
|
||||
list_for_each_entry(output, &display->outputs, item) {
|
||||
if (output->crtc != crtc)
|
||||
continue;
|
||||
|
||||
|
|
@ -727,7 +727,7 @@ static int nv50_kms_crtcs_init(struct drm_device *dev)
|
|||
* The internal structure is already allocated and so is the public one.
|
||||
* Just a matter of getting to the memory and register it.
|
||||
*/
|
||||
list_for_each_entry(crtc, &display->crtcs, head) {
|
||||
list_for_each_entry(crtc, &display->crtcs, item) {
|
||||
struct drm_crtc *drm_crtc = to_nv50_kms_crtc(crtc);
|
||||
|
||||
drm_crtc_init(dev, drm_crtc, &nv50_kms_crtc_funcs);
|
||||
|
|
@ -759,7 +759,7 @@ static int nv50_kms_encoders_init(struct drm_device *dev)
|
|||
struct nv50_display *display = nv50_get_display(dev);
|
||||
struct nv50_output *output = NULL;
|
||||
|
||||
list_for_each_entry(output, &display->outputs, head) {
|
||||
list_for_each_entry(output, &display->outputs, item) {
|
||||
struct drm_encoder *drm_encoder = to_nv50_kms_encoder(output);
|
||||
uint32_t type = DRM_MODE_ENCODER_NONE;
|
||||
|
||||
|
|
@ -1003,7 +1003,7 @@ static int nv50_kms_connectors_init(struct drm_device *dev)
|
|||
struct nv50_connector *connector = NULL;
|
||||
int i;
|
||||
|
||||
list_for_each_entry(connector, &display->connectors, head) {
|
||||
list_for_each_entry(connector, &display->connectors, item) {
|
||||
struct drm_connector *drm_connector = to_nv50_kms_connector(connector);
|
||||
uint32_t type = DRM_MODE_CONNECTOR_Unknown;
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
#define OUTPUT_TV 4
|
||||
|
||||
struct nv50_output {
|
||||
struct list_head head;
|
||||
struct list_head item;
|
||||
|
||||
struct drm_device *dev;
|
||||
int bus;
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ static int nv50_sor_destroy(struct nv50_output *output)
|
|||
if (!display || !output)
|
||||
return -EINVAL;
|
||||
|
||||
list_del(&output->head);
|
||||
list_del(&output->item);
|
||||
|
||||
kfree(output->native_mode);
|
||||
if (dev_priv->free_output)
|
||||
|
|
@ -205,7 +205,7 @@ int nv50_sor_create(struct drm_device *dev, int dcb_entry)
|
|||
output->dcb_entry = dcb_entry;
|
||||
output->bus = entry->bus;
|
||||
|
||||
list_add_tail(&output->head, &display->outputs);
|
||||
list_add_tail(&output->item, &display->outputs);
|
||||
|
||||
output->native_mode = kzalloc(sizeof(struct nouveau_hw_mode), GFP_KERNEL);
|
||||
if (!output->native_mode) {
|
||||
|
|
|
|||
|
|
@ -549,7 +549,7 @@ nouveau_nv50_display_irq_handler(struct drm_device *dev)
|
|||
if (display->last_crtc == crtc_index)
|
||||
clock_ack = true;
|
||||
|
||||
list_for_each_entry(crtc, &display->crtcs, head) {
|
||||
list_for_each_entry(crtc, &display->crtcs, item) {
|
||||
if (crtc->index == crtc_index)
|
||||
break;
|
||||
}
|
||||
|
|
@ -564,7 +564,7 @@ nouveau_nv50_display_irq_handler(struct drm_device *dev)
|
|||
|
||||
crtc->set_clock_mode(crtc);
|
||||
|
||||
list_for_each_entry(output, &display->outputs, head) {
|
||||
list_for_each_entry(output, &display->outputs, item) {
|
||||
if (!output->crtc)
|
||||
continue;
|
||||
|
||||
|
|
|
|||
|
|
@ -738,7 +738,7 @@ void nouveau_mem_free(struct drm_device* dev, struct mem_block* block)
|
|||
struct nv50_crtc *crtc = NULL;
|
||||
struct nv50_display *display = nv50_get_display(dev);
|
||||
|
||||
list_for_each_entry(crtc, &display->crtcs, head) {
|
||||
list_for_each_entry(crtc, &display->crtcs, item) {
|
||||
if (crtc->fb->block == block) {
|
||||
crtc->fb->block = NULL;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue