On 10/29/2014 05:22 PM, Damien Lespiau wrote:
crtc->base.primary->fb was used everywhere. Use fb to temporarily point
there and don't forget to assign fb to its final destination at the end.

v2: Rebase on top of misc changes (mask of DSPSURF, PAGE_ALIGN)

Signed-off-by: Damien Lespiau <damien.lesp...@intel.com>
---
  drivers/gpu/drm/i915/intel_display.c | 61 ++++++++++++++++--------------------
  1 file changed, 27 insertions(+), 34 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c 
b/drivers/gpu/drm/i915/intel_display.c
index 2a84e47..6c042eb 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -6459,9 +6459,10 @@ static void i9xx_get_plane_config(struct intel_crtc 
*crtc,
        int pipe = crtc->pipe, plane = crtc->plane;
        int fourcc, pixel_format;
        int aligned_height;
+       struct drm_framebuffer *fb;

-       crtc->base.primary->fb = kzalloc(sizeof(struct intel_framebuffer), 
GFP_KERNEL);
-       if (!crtc->base.primary->fb) {
+       fb = kzalloc(sizeof(struct intel_framebuffer), GFP_KERNEL);
+       if (!fb) {
                DRM_DEBUG_KMS("failed to alloc fb\n");
                return;

Is it of any consequence that after the change crtc->base.primary->fb will preserve it's content, while previously it would be NULLed on allocation failure? Probably not, just asking...

Tvrtko

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to