Re: [PATCH 3/8] drm/i915: Unclutter the get_plane() functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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.lespiau@xxxxxxxxx>
---
  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@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux