From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [RESEND PATCH 3/3] drm: Destroy property blobs at mode config cleanup time Date: Tue, 16 Apr 2013 21:06:43 +0200 Message-ID: <20130416190643.GJ27612@phenom.ffwll.local> References: <1366033036-16331-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> <1366033036-16331-4-git-send-email-laurent.pinchart+renesas@ideasonboard.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ea0-f182.google.com (mail-ea0-f182.google.com [209.85.215.182]) by gabe.freedesktop.org (Postfix) with ESMTP id 21B1EE64E6 for ; Tue, 16 Apr 2013 12:03:42 -0700 (PDT) Received: by mail-ea0-f182.google.com with SMTP id q15so398595ead.13 for ; Tue, 16 Apr 2013 12:03:42 -0700 (PDT) Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Dave Airlie Cc: Daniel Vetter , Laurent Pinchart , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Tue, Apr 16, 2013 at 01:12:21PM +1000, Dave Airlie wrote: > On Mon, Apr 15, 2013 at 11:37 PM, Laurent Pinchart > wrote: > > Property blob objects need to be destroyed when cleaning up to avoid > > memory leaks. Go through the list of all blobs in the > > drm_mode_config_cleanup() function and destroy them. > > > > The drm_mode_config_cleanup() function needs to be moved after the > > drm_property_destroy_blob() declaration. Move drm_mode_config_init() as > > well to keep the functions together. > > > > Signed-off-by: Laurent Pinchart > > Reviewed-by: Daniel Vetter > > I've applied this one, the other two I don't mind, but I'm not sure > they aren't a bit restrictive in the generic code, Patch 2 is just for the crtc helpers, and matches what we've just done in the i915 code. I think it fits in with the general design of the crtc helpers. Patch 1 matches a check in the intel code, too. So since applications can't really know whether a flip to a different pixel format works I don't think that capability is useful at all. And at least for i915 it's just broken ;-) On patch 1 itself though: Just checking fb->pixel_format should be good enough. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch