All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ивайло Димитров" <freemangordon@abv.bg>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: minchan@kernel.org, pavel@ucw.cz, sre@debian.org,
	pali.rohar@gmail.com, pc+n900@asdf.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: OMAPFB: CMA allocation failures
Date: Tue, 5 Nov 2013 21:55:51 +0200 (EET)	[thread overview]
Message-ID: <1380566786.52844.1383681351015.JavaMail.apache@mail83.abv.bg> (raw)

 




 >-------- D?N?D,D3D,D 1/2 D?D>>D 1/2 D 3/4  D?D,N?D 1/4 D 3/4  --------
 >D?N?:  Tomi Valkeinen 
 >D?N?D 1/2 D 3/4 N?D 1/2 D 3/4 : Re: OMAPFB: CMA allocation failures
 >D?D 3/4 : D?D2D?D1D>>D 3/4  D?D,D 1/4 D,N?N?D 3/4 D2
 >D?D.D?N?D?N?DuD 1/2 D 3/4  D 1/2 D?: D!N?N?D'D?, 2013, D?DoN?D 3/4 D 1/4 D2N?D, 30 14:19:32 EET
 >
 >I really dislike the idea of adding the omap vram allocator back. Then
 >again, if the CMA doesn't work, something has to be done.
 >

If I got Minchan Kim's explanation correctly, CMA simply can't be used
for allocation of framebuffer memory, because it is unreliable.

 >Pre-allocating is possible, but that won't work if there's any need to
 >re-allocating the framebuffers. Except if the omapfb would retain and
 >manage the pre-allocated buffers, but that would just be more or less
 >the old vram allocator again.
 >
 >So, as I see it, the best option would be to have the standard dma_alloc
 >functions get the memory for omapfb from a private pool, which is not
 >used for anything else.
 >
 >I wonder if that's possible already? It sounds quite trivial to me.
 
dma_alloc functions use either CMA or (iirc) get_pages_exact if CMA is
disabled. Both of those fail easily. AFAIK there are several 
implementations with similar functionality, like CMEM and ION but
(correct me if I am wrong) neither of them is upstreamed. In the 
current kernel I don't see anything that can be used for the purpose 
of reliable allocation of big chunks of contiguous memory.
So, something should be done, but honestly, I can't think of anything
but bringing VRAM allocator back. Not that I like the idea of bringing
back ~700 lines of code, but I see no other option if omapfb driver is
to be actually useful.

Regards,
Ivo

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: "Ивайло Димитров" <freemangordon@abv.bg>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: minchan@kernel.org, pavel@ucw.cz, sre@debian.org,
	pali.rohar@gmail.com, pc+n900@asdf.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: OMAPFB: CMA allocation failures
Date: Tue, 5 Nov 2013 21:55:51 +0200 (EET)	[thread overview]
Message-ID: <1380566786.52844.1383681351015.JavaMail.apache@mail83.abv.bg> (raw)

 




 >-------- Оригинално писмо --------
 >От:  Tomi Valkeinen 
 >Относно: Re: OMAPFB: CMA allocation failures
 >До: Ивайло Димитров
 >Изпратено на: Сряда, 2013, Октомври 30 14:19:32 EET
 >
 >I really dislike the idea of adding the omap vram allocator back. Then
 >again, if the CMA doesn't work, something has to be done.
 >

If I got Minchan Kim's explanation correctly, CMA simply can't be used
for allocation of framebuffer memory, because it is unreliable.

 >Pre-allocating is possible, but that won't work if there's any need to
 >re-allocating the framebuffers. Except if the omapfb would retain and
 >manage the pre-allocated buffers, but that would just be more or less
 >the old vram allocator again.
 >
 >So, as I see it, the best option would be to have the standard dma_alloc
 >functions get the memory for omapfb from a private pool, which is not
 >used for anything else.
 >
 >I wonder if that's possible already? It sounds quite trivial to me.
 
dma_alloc functions use either CMA or (iirc) get_pages_exact if CMA is
disabled. Both of those fail easily. AFAIK there are several 
implementations with similar functionality, like CMEM and ION but
(correct me if I am wrong) neither of them is upstreamed. In the 
current kernel I don't see anything that can be used for the purpose 
of reliable allocation of big chunks of contiguous memory.
So, something should be done, but honestly, I can't think of anything
but bringing VRAM allocator back. Not that I like the idea of bringing
back ~700 lines of code, but I see no other option if omapfb driver is
to be actually useful.

Regards,
Ivo

             reply	other threads:[~2013-11-05 19:55 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-05 19:55 Ивайло Димитров [this message]
2013-11-05 19:55 ` OMAPFB: CMA allocation failures Ивайло Димитров
     [not found] <1847426616.52843.1383681351015.JavaMail.apache@mail83.abv.bg>
2013-11-30 10:00 ` Ivajlo Dimitrov
2013-11-30 10:00   ` Ivajlo Dimitrov
2013-12-05 11:25   ` Tomi Valkeinen
2013-12-05 11:25     ` Tomi Valkeinen
2013-12-06  8:31     ` Ivajlo Dimitrov
2013-12-06  8:31       ` Ivajlo Dimitrov
  -- strict thread matches above, loose matches on Subject: below --
2013-10-29 12:47 Ивайло Димитров
2013-10-29 12:47 ` Ивайло Димитров
2013-10-30  5:53 ` Minchan Kim
2013-10-30  5:53   ` Minchan Kim
2013-10-30 12:19 ` Tomi Valkeinen
2013-10-30 12:19   ` Tomi Valkeinen
2013-10-23 21:59 Ивайло Димитров
2013-10-23 21:59 ` Ивайло Димитров
2013-10-24  7:00 ` Tomi Valkeinen
2013-10-24  7:00   ` Tomi Valkeinen
2013-10-16  6:33 Ивайло Димитров
2013-10-16  6:33 ` Ивайло Димитров
2013-10-15  6:49 Ивайло Димитров
2013-10-15  6:49 ` Ивайло Димитров
2013-10-15  7:36 ` Tomi Valkeinen
2013-10-15  7:36   ` Tomi Valkeinen
2013-10-28  7:37 ` Minchan Kim
2013-10-28  7:37   ` Minchan Kim
2013-10-12 14:43 Ивайло Димитров
2013-10-14  6:04 ` Tomi Valkeinen

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=1380566786.52844.1383681351015.JavaMail.apache@mail83.abv.bg \
    --to=freemangordon@abv.bg \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=pali.rohar@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=pc+n900@asdf.org \
    --cc=sre@debian.org \
    --cc=tomi.valkeinen@ti.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.