Skip to content

Commit

Permalink
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Browse files Browse the repository at this point in the history
Pull drm fixes from Dave Airlie:
 "One nouveau regression fix on older cards, i915 black screen fixes,
  and a revert for a strange G33 intel problem"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/nouveau: fix null ptr dereferences on some boards
  Revert "drm: copy mode type in drm_mode_connector_list_update()"
  drm/i915/bdw: make sure south port interrupts are enabled properly v2
  drm/i915: Don't grab crtc mutexes in intel_modeset_gem_init()
  drm/i915: fix DDI PLLs HW state readout code
  • Loading branch information
Linus Torvalds committed Jan 15, 2014
2 parents a6da83f + 703a8c2 commit 145830d
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 14 deletions.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/drm_modes.c
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,7 @@ void drm_mode_connector_list_update(struct drm_connector *connector)
/* if equal delete the probed mode */
mode->status = pmode->status;
/* Merge type bits together */
mode->type = pmode->type;
mode->type |= pmode->type;
list_del(&pmode->head);
drm_mode_destroy(connector->dev, pmode);
break;
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/i915/i915_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -2713,6 +2713,8 @@ static void gen8_irq_preinstall(struct drm_device *dev)
#undef GEN8_IRQ_INIT_NDX

POSTING_READ(GEN8_PCU_IIR);

ibx_irq_preinstall(dev);
}

static void ibx_hpd_irq_setup(struct drm_device *dev)
Expand Down
8 changes: 7 additions & 1 deletion drivers/gpu/drm/i915/intel_ddi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1057,12 +1057,18 @@ void intel_ddi_setup_hw_pll_state(struct drm_device *dev)
enum pipe pipe;
struct intel_crtc *intel_crtc;

dev_priv->ddi_plls.spll_refcount = 0;
dev_priv->ddi_plls.wrpll1_refcount = 0;
dev_priv->ddi_plls.wrpll2_refcount = 0;

for_each_pipe(pipe) {
intel_crtc =
to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]);

if (!intel_crtc->active)
if (!intel_crtc->active) {
intel_crtc->ddi_pll_sel = PORT_CLK_SEL_NONE;
continue;
}

intel_crtc->ddi_pll_sel = intel_ddi_get_crtc_pll(dev_priv,
pipe);
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -11053,10 +11053,10 @@ void intel_modeset_gem_init(struct drm_device *dev)

intel_setup_overlay(dev);

drm_modeset_lock_all(dev);
mutex_lock(&dev->mode_config.mutex);
drm_mode_config_reset(dev);
intel_modeset_setup_hw_state(dev, false);
drm_modeset_unlock_all(dev);
mutex_unlock(&dev->mode_config.mutex);
}

void intel_modeset_cleanup(struct drm_device *dev)
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/nouveau/core/include/subdev/i2c.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ struct nouveau_i2c {
int (*identify)(struct nouveau_i2c *, int index,
const char *what, struct nouveau_i2c_board_info *,
bool (*match)(struct nouveau_i2c_port *,
struct i2c_board_info *));
struct i2c_board_info *, void *), void *);
struct list_head ports;
};

Expand Down
7 changes: 7 additions & 0 deletions drivers/gpu/drm/nouveau/core/include/subdev/instmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ struct nouveau_instmem {
static inline struct nouveau_instmem *
nouveau_instmem(void *obj)
{
/* nv04/nv40 impls need to create objects in their constructor,
* which is before the subdev pointer is valid
*/
if (nv_iclass(obj, NV_SUBDEV_CLASS) &&
nv_subidx(obj) == NVDEV_SUBDEV_INSTMEM)
return obj;

return (void *)nv_device(obj)->subdev[NVDEV_SUBDEV_INSTMEM];
}

Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/nouveau/core/subdev/i2c/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ static int
nouveau_i2c_identify(struct nouveau_i2c *i2c, int index, const char *what,
struct nouveau_i2c_board_info *info,
bool (*match)(struct nouveau_i2c_port *,
struct i2c_board_info *))
struct i2c_board_info *, void *), void *data)
{
struct nouveau_i2c_port *port = nouveau_i2c_find(i2c, index);
int i;
Expand All @@ -221,7 +221,7 @@ nouveau_i2c_identify(struct nouveau_i2c *i2c, int index, const char *what,
}

if (nv_probe_i2c(port, info[i].dev.addr) &&
(!match || match(port, &info[i].dev))) {
(!match || match(port, &info[i].dev, data))) {
nv_info(i2c, "detected %s: %s\n", what,
info[i].dev.type);
return i;
Expand Down
10 changes: 5 additions & 5 deletions drivers/gpu/drm/nouveau/core/subdev/therm/ic.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@

static bool
probe_monitoring_device(struct nouveau_i2c_port *i2c,
struct i2c_board_info *info)
struct i2c_board_info *info, void *data)
{
struct nouveau_therm_priv *priv = (void *)nouveau_therm(i2c);
struct nouveau_therm_priv *priv = data;
struct nvbios_therm_sensor *sensor = &priv->bios_sensor;
struct i2c_client *client;

Expand Down Expand Up @@ -96,7 +96,7 @@ nouveau_therm_ic_ctor(struct nouveau_therm *therm)
};

i2c->identify(i2c, NV_I2C_DEFAULT(0), "monitoring device",
board, probe_monitoring_device);
board, probe_monitoring_device, therm);
if (priv->ic)
return;
}
Expand All @@ -108,7 +108,7 @@ nouveau_therm_ic_ctor(struct nouveau_therm *therm)
};

i2c->identify(i2c, NV_I2C_DEFAULT(0), "monitoring device",
board, probe_monitoring_device);
board, probe_monitoring_device, therm);
if (priv->ic)
return;
}
Expand All @@ -117,5 +117,5 @@ nouveau_therm_ic_ctor(struct nouveau_therm *therm)
device. Let's try our static list.
*/
i2c->identify(i2c, NV_I2C_DEFAULT(0), "monitoring device",
nv_board_infos, probe_monitoring_device);
nv_board_infos, probe_monitoring_device, therm);
}
2 changes: 1 addition & 1 deletion drivers/gpu/drm/nouveau/dispnv04/dfp.c
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ static void nv04_tmds_slave_init(struct drm_encoder *encoder)
get_tmds_slave(encoder))
return;

type = i2c->identify(i2c, 2, "TMDS transmitter", info, NULL);
type = i2c->identify(i2c, 2, "TMDS transmitter", info, NULL, NULL);
if (type < 0)
return;

Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/nouveau/dispnv04/tvnv04.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ int nv04_tv_identify(struct drm_device *dev, int i2c_index)
struct nouveau_i2c *i2c = nouveau_i2c(drm->device);

return i2c->identify(i2c, i2c_index, "TV encoder",
nv04_tv_encoder_info, NULL);
nv04_tv_encoder_info, NULL, NULL);
}


Expand Down

0 comments on commit 145830d

Please sign in to comment.