* [PATCH 4.9 49/66] drm/i915: Dont leak edid in intel_crt_detect_ddc()
[not found] <20170131053603.098140622@linuxfoundation.org>
@ 2017-01-31 5:36 ` Greg Kroah-Hartman
2017-01-31 5:36 ` [PATCH 4.9 50/66] drm/i915: Dont init hpd polling for vlv and chv from runtime_suspend() Greg Kroah-Hartman
` (2 subsequent siblings)
3 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-31 5:36 UTC (permalink / raw)
To: linux-kernel
Cc: Ander Conselvan de Oliveira, Jani Nikula, Daniel Vetter,
intel-gfx, stable, Greg Kroah-Hartman, Daniel Vetter
4.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
commit c34f078675f505c4437919bb1897b1351f16a050 upstream.
In the path where intel_crt_detect_ddc() detects a CRT, if would return
true without freeing the edid.
Fixes: a2bd1f541f19 ("drm/i915: check whether we actually received an edid in detect_ddc")
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1484922525-6131-1-git-send-email-ander.conselvan.de.oliveira@intel.com
(cherry picked from commit c96b63a6a7ac4bd670ec2e663793a9a31418b790)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/i915/intel_crt.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
--- a/drivers/gpu/drm/i915/intel_crt.c
+++ b/drivers/gpu/drm/i915/intel_crt.c
@@ -499,6 +499,7 @@ static bool intel_crt_detect_ddc(struct
struct drm_i915_private *dev_priv = to_i915(crt->base.base.dev);
struct edid *edid;
struct i2c_adapter *i2c;
+ bool ret = false;
BUG_ON(crt->base.type != INTEL_OUTPUT_ANALOG);
@@ -515,17 +516,17 @@ static bool intel_crt_detect_ddc(struct
*/
if (!is_digital) {
DRM_DEBUG_KMS("CRT detected via DDC:0x50 [EDID]\n");
- return true;
+ ret = true;
+ } else {
+ DRM_DEBUG_KMS("CRT not detected via DDC:0x50 [EDID reports a digital panel]\n");
}
-
- DRM_DEBUG_KMS("CRT not detected via DDC:0x50 [EDID reports a digital panel]\n");
} else {
DRM_DEBUG_KMS("CRT not detected via DDC:0x50 [no valid EDID found]\n");
}
kfree(edid);
- return false;
+ return ret;
}
static enum drm_connector_status
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 4.9 50/66] drm/i915: Dont init hpd polling for vlv and chv from runtime_suspend()
[not found] <20170131053603.098140622@linuxfoundation.org>
2017-01-31 5:36 ` [PATCH 4.9 49/66] drm/i915: Dont leak edid in intel_crt_detect_ddc() Greg Kroah-Hartman
@ 2017-01-31 5:36 ` Greg Kroah-Hartman
2017-01-31 5:36 ` [PATCH 4.9 51/66] drm/i915: Fix calculation of rotated x and y offsets for planar formats Greg Kroah-Hartman
2017-01-31 5:36 ` [PATCH 4.9 52/66] drm/i915: Check for NULL atomic state in intel_crtc_disable_noatomic() Greg Kroah-Hartman
3 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-31 5:36 UTC (permalink / raw)
To: linux-kernel
Cc: Ander Conselvan de Oliveira, Jani Nikula, Greg Kroah-Hartman,
intel-gfx, stable, Daniel Vetter, Daniel Vetter
4.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
commit 21d6e0bde50713922a6520ef84e5fd245b05d468 upstream.
An error in the condition for avoiding the call to intel_hpd_poll_init()
for valleyview and cherryview from intel_runtime_suspend() caused it to
be called unconditionally. Fix it.
Fixes: 19625e85c6ec ("drm/i915: Enable polling when we don't have hpd")
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Lyude <cpaul@redhat.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1484922525-6131-2-git-send-email-ander.conselvan.de.oliveira@intel.com
(cherry picked from commit 04313b00b79405f86d815100f85c47a2ee5b8ca0)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/i915/i915_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -2372,7 +2372,7 @@ static int intel_runtime_suspend(struct
assert_forcewakes_inactive(dev_priv);
- if (!IS_VALLEYVIEW(dev_priv) || !IS_CHERRYVIEW(dev_priv))
+ if (!IS_VALLEYVIEW(dev_priv) && !IS_CHERRYVIEW(dev_priv))
intel_hpd_poll_init(dev_priv);
DRM_DEBUG_KMS("Device suspended\n");
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 4.9 51/66] drm/i915: Fix calculation of rotated x and y offsets for planar formats
[not found] <20170131053603.098140622@linuxfoundation.org>
2017-01-31 5:36 ` [PATCH 4.9 49/66] drm/i915: Dont leak edid in intel_crt_detect_ddc() Greg Kroah-Hartman
2017-01-31 5:36 ` [PATCH 4.9 50/66] drm/i915: Dont init hpd polling for vlv and chv from runtime_suspend() Greg Kroah-Hartman
@ 2017-01-31 5:36 ` Greg Kroah-Hartman
2017-01-31 5:36 ` [PATCH 4.9 52/66] drm/i915: Check for NULL atomic state in intel_crtc_disable_noatomic() Greg Kroah-Hartman
3 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-31 5:36 UTC (permalink / raw)
To: linux-kernel
Cc: Ander Conselvan de Oliveira, Jani Nikula, Greg Kroah-Hartman,
intel-gfx, stable, Daniel Vetter
4.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
commit 3781bd6e7d64d5f5bea9fdee11ab9460a700c0e4 upstream.
Parameters tile_size, tile_width and tile_height were passed in the
wrong order to _intel_adjust_tile_offset() when calculating the rotated
offsets.
This doesn't fix any user visible bug, since for packed formats new
and old offset are the same and the rotated offsets are within a tile
before they are fed to _intel_adjust_tile_offset(). In that case, the
offsets are unchanged. That is not true for planar formats, but those
are currently not supported.
Fixes: 66a2d927cb0e ("drm/i915: Make intel_adjust_tile_offset() work for linear buffers")
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1484922525-6131-3-git-send-email-ander.conselvan.de.oliveira@intel.com
(cherry picked from commit 46a1bd289507dfcc428fb9daf65421ed6be6af8b)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/i915/intel_display.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2587,8 +2587,9 @@ intel_fill_fb_info(struct drm_i915_priva
* We only keep the x/y offsets, so push all of the
* gtt offset into the x/y offsets.
*/
- _intel_adjust_tile_offset(&x, &y, tile_size,
- tile_width, tile_height, pitch_tiles,
+ _intel_adjust_tile_offset(&x, &y,
+ tile_width, tile_height,
+ tile_size, pitch_tiles,
gtt_offset_rotated * tile_size, 0);
gtt_offset_rotated += rot_info->plane[i].width * rot_info->plane[i].height;
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 4.9 52/66] drm/i915: Check for NULL atomic state in intel_crtc_disable_noatomic()
[not found] <20170131053603.098140622@linuxfoundation.org>
` (2 preceding siblings ...)
2017-01-31 5:36 ` [PATCH 4.9 51/66] drm/i915: Fix calculation of rotated x and y offsets for planar formats Greg Kroah-Hartman
@ 2017-01-31 5:36 ` Greg Kroah-Hartman
3 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-31 5:36 UTC (permalink / raw)
To: linux-kernel
Cc: Ander Conselvan de Oliveira, Jani Nikula, Greg Kroah-Hartman,
intel-gfx, stable, Daniel Vetter, Daniel Vetter
4.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
commit 6d1d427a4e24c403b4adf928d61994bdaa0ca03a upstream.
In intel_crtc_disable_noatomic(), bail on a failure to allocate an
atomic state to avoid a NULL pointer dereference.
Fixes: 4a80655827af ("drm/i915: Pass atomic state to crtc enable/disable functions")
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1484922525-6131-4-git-send-email-ander.conselvan.de.oliveira@intel.com
(cherry picked from commit 31bb2ef97ea9db343348f9b5ccaa9bb6f48fc655)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/i915/intel_display.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -6869,6 +6869,12 @@ static void intel_crtc_disable_noatomic(
}
state = drm_atomic_state_alloc(crtc->dev);
+ if (!state) {
+ DRM_DEBUG_KMS("failed to disable [CRTC:%d:%s], out of memory",
+ crtc->base.id, crtc->name);
+ return;
+ }
+
state->acquire_ctx = crtc->dev->mode_config.acquire_ctx;
/* Everything's already locked, -EDEADLK can't happen. */
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-01-31 5:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20170131053603.098140622@linuxfoundation.org>
2017-01-31 5:36 ` [PATCH 4.9 49/66] drm/i915: Dont leak edid in intel_crt_detect_ddc() Greg Kroah-Hartman
2017-01-31 5:36 ` [PATCH 4.9 50/66] drm/i915: Dont init hpd polling for vlv and chv from runtime_suspend() Greg Kroah-Hartman
2017-01-31 5:36 ` [PATCH 4.9 51/66] drm/i915: Fix calculation of rotated x and y offsets for planar formats Greg Kroah-Hartman
2017-01-31 5:36 ` [PATCH 4.9 52/66] drm/i915: Check for NULL atomic state in intel_crtc_disable_noatomic() Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).