Commit bfad2d08 authored by Dave Airlie's avatar Dave Airlie

Merge branch 'linux-4.16' of git://github.com/skeggsb/linux into drm-fixes

single fix for older gpus.

* 'linux-4.16' of git://github.com/skeggsb/linux:
  drm/nouveau: Make clock gate support conditional
parents 8d3c6294 92256269
...@@ -301,7 +301,7 @@ nvkm_therm_attr_set(struct nvkm_therm *therm, ...@@ -301,7 +301,7 @@ nvkm_therm_attr_set(struct nvkm_therm *therm,
void void
nvkm_therm_clkgate_enable(struct nvkm_therm *therm) nvkm_therm_clkgate_enable(struct nvkm_therm *therm)
{ {
if (!therm->func->clkgate_enable || !therm->clkgating_enabled) if (!therm || !therm->func->clkgate_enable || !therm->clkgating_enabled)
return; return;
nvkm_debug(&therm->subdev, nvkm_debug(&therm->subdev,
...@@ -312,7 +312,7 @@ nvkm_therm_clkgate_enable(struct nvkm_therm *therm) ...@@ -312,7 +312,7 @@ nvkm_therm_clkgate_enable(struct nvkm_therm *therm)
void void
nvkm_therm_clkgate_fini(struct nvkm_therm *therm, bool suspend) nvkm_therm_clkgate_fini(struct nvkm_therm *therm, bool suspend)
{ {
if (!therm->func->clkgate_fini || !therm->clkgating_enabled) if (!therm || !therm->func->clkgate_fini || !therm->clkgating_enabled)
return; return;
nvkm_debug(&therm->subdev, nvkm_debug(&therm->subdev,
...@@ -395,7 +395,7 @@ void ...@@ -395,7 +395,7 @@ void
nvkm_therm_clkgate_init(struct nvkm_therm *therm, nvkm_therm_clkgate_init(struct nvkm_therm *therm,
const struct nvkm_therm_clkgate_pack *p) const struct nvkm_therm_clkgate_pack *p)
{ {
if (!therm->func->clkgate_init || !therm->clkgating_enabled) if (!therm || !therm->func->clkgate_init || !therm->clkgating_enabled)
return; return;
therm->func->clkgate_init(therm, p); therm->func->clkgate_init(therm, p);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment