From: James Simmons <jsimmons@infradead.org>
To: Clemens Ladisch <clemens@ladisch.de>
Cc: Dave Airlie <airlied@redhat.com>,
dri-devel@lists.sourceforge.net,
linux-fbdev-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/3] drm/kms: allocate framebuffer cmap
Date: Tue, 3 Nov 2009 17:19:05 +0000 (GMT) [thread overview]
Message-ID: <alpine.LFD.2.00.0911031718160.14442@casper.infradead.org> (raw)
In-Reply-To: <4AF01FFD.50409@ladisch.de>
> Without an allocated colormap, FBIOGETCMAP fails. This would make
> programs restore an all-black colormap ("links -g") or fail to work
> altogether ("mplayer -vo fbdev2").
>
> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
> ---
> v2: implemented suggestions by James Simmons
>
> drivers/gpu/drm/drm_fb_helper.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> --- linux-2.6/drivers/gpu/drm/drm_fb_helper.c
> +++ linux-2.6/drivers/gpu/drm/drm_fb_helper.c
> @@ -905,6 +905,9 @@ int drm_fb_helper_single_fb_probe(struct
>
> if (new_fb) {
> info->var.pixclock = 0;
> + ret = fb_alloc_cmap(&info->cmap, crtc->gamma_size, 0);
> + if (ret)
> + return ret;
> if (register_framebuffer(info) < 0) {
fb_dealloc_cmap(info->cmap);
> return -EINVAL;
}
Plug memory leak.
> } else {
> @@ -936,6 +939,7 @@ void drm_fb_helper_free(struct drm_fb_he
> unregister_sysrq_key('v', &sysrq_drm_fb_helper_restore_op);
> }
> drm_fb_helper_crtc_free(helper);
> + fb_dealloc_cmap(&helper->fb->fbdev->cmap);
> }
> EXPORT_SYMBOL(drm_fb_helper_free);
>
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> --
> _______________________________________________
> Dri-devel mailing list
> Dri-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dri-devel
>
next prev parent reply other threads:[~2009-11-03 17:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-02 7:40 [PATCH 0/3] DRM/KMS framebuffer fixes Clemens Ladisch
2009-11-02 7:41 ` [PATCH 1/3] drm/fb: fix FBIOGET/PUT_VSCREENINFO pixel clock handling Clemens Ladisch
2009-11-02 7:42 ` [PATCH 2/3] drm/radeon/kms: allocate framebuffer cmap Clemens Ladisch
2009-11-02 7:42 ` [PATCH 3/3] drm/i915: " Clemens Ladisch
2009-11-02 14:33 ` James Simmons
2009-11-03 12:17 ` [PATCH v2 0/3] DRM/KMS framebuffer fixes Clemens Ladisch
2009-11-03 12:18 ` [PATCH v2 1/3] drm/fb: fix FBIOGET/PUT_VSCREENINFO pixel clock handling Clemens Ladisch
2009-11-03 12:19 ` [PATCH v2 2/3] drm: set the type of the drm_framebuffer::fbdev field Clemens Ladisch
2009-11-03 12:20 ` [PATCH v2 3/3] drm/kms: allocate framebuffer cmap Clemens Ladisch
2009-11-03 17:19 ` James Simmons [this message]
2009-11-04 8:40 ` [PATCH v3 0/3] DRM/KMS framebuffer fixes Clemens Ladisch
2009-11-04 8:42 ` [PATCH v3 1/3] drm/fb: fix FBIOGET/PUT_VSCREENINFO pixel clock handling Clemens Ladisch
2009-11-04 8:42 ` [PATCH v3 2/3] drm: set the type of the drm_framebuffer::fbdev field Clemens Ladisch
2009-11-04 8:43 ` [PATCH v3 3/3] drm/kms: allocate framebuffer cmap Clemens Ladisch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.00.0911031718160.14442@casper.infradead.org \
--to=jsimmons@infradead.org \
--cc=airlied@redhat.com \
--cc=clemens@ladisch.de \
--cc=dri-devel@lists.sourceforge.net \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®