All of lore.kernel.org
 help / color / mirror / Atom feed
* How to access a DRM CRTC's scan out buffer?
@ 2014-01-11 13:27 Sannu K
  2014-01-16  7:44 ` Peter Teoh
  0 siblings, 1 reply; 6+ messages in thread
From: Sannu K @ 2014-01-11 13:27 UTC (permalink / raw)
  To: kernelnewbies

Hi,

I would like to access a monitor's content in kernel mode. I tried but
could not find a generic way to access CRTC's scan out buffer in kernel
mode. I prefer to do it in kernel mode as an experiment. Any pointers will
greatly help.

Thanks and Regards,
Sannu K
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140111/229badab/attachment.html 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* How to access a DRM CRTC's scan out buffer?
  2014-01-11 13:27 How to access a DRM CRTC's scan out buffer? Sannu K
@ 2014-01-16  7:44 ` Peter Teoh
  2014-01-16  7:51   ` Peter Teoh
  2014-01-16 12:06   ` Sannu K
  0 siblings, 2 replies; 6+ messages in thread
From: Peter Teoh @ 2014-01-16  7:44 UTC (permalink / raw)
  To: kernelnewbies

In general how it worked is explained here:

https://www.kernel.org/doc/htmldocs/drm/drm-kms-init.html

Not sure which is the name of your video card, but I think in general all
the page flip API should have access to the scan buffer (see link above).
For Intel these are possible APIs
:


static void do_intel_finish_page_flip(struct drm_device *dev,
void intel_finish_page_flip(struct drm_device *dev, int pipe)
do_intel_finish_page_flip(dev, crtc);
void intel_finish_page_flip_plane(struct drm_device *dev, int plane)
do_intel_finish_page_flip(dev, crtc);
void intel_prepare_page_flip(struct drm_device *dev, int plane)
 * is also accompanied by a spurious intel_prepare_page_flip().
inline static void intel_mark_page_flip_active(struct intel_crtc
*intel_crtc)


On Sat, Jan 11, 2014 at 9:27 PM, Sannu K <sannumail4foss@gmail.com> wrote:

> Hi,
>
> I would like to access a monitor's content in kernel mode. I tried but
> could not find a generic way to access CRTC's scan out buffer in kernel
> mode. I prefer to do it in kernel mode as an experiment. Any pointers will
> greatly help.
>
> Thanks and Regards,
> Sannu K
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>


-- 
Regards,
Peter Teoh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140116/f6682c2f/attachment.html 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* How to access a DRM CRTC's scan out buffer?
  2014-01-16  7:44 ` Peter Teoh
@ 2014-01-16  7:51   ` Peter Teoh
  2014-01-16 12:06   ` Sannu K
  1 sibling, 0 replies; 6+ messages in thread
From: Peter Teoh @ 2014-01-16  7:51 UTC (permalink / raw)
  To: kernelnewbies

For ATI GPU the crtc_base could be the base pointer to the memory buffer:

./drivers/gpu/drm/radeon/rv770.c:
u32 rv770_page_flip(struct radeon_device *rdev, int crtc_id, u64 crtc_base)

./drivers/gpu/drm/radeon/rs600.c:
void rs600_pre_page_flip(struct radeon_device *rdev, int crtc)
void rs600_post_page_flip(struct radeon_device *rdev, int crtc)
u32 rs600_page_flip(struct radeon_device *rdev, int crtc_id, u64 crtc_base)

As to the internals of these buffer area, well, u may need the datasheet
from the vendor.   Just grep for "CRTC" inside the gpu/drm/radeon directory
and you can understand why.


On Thu, Jan 16, 2014 at 3:44 PM, Peter Teoh <htmldeveloper@gmail.com> wrote:

> In general how it worked is explained here:
>
> https://www.kernel.org/doc/htmldocs/drm/drm-kms-init.html
>
> Not sure which is the name of your video card, but I think in general all
> the page flip API should have access to the scan buffer (see link above).
> For Intel these are possible APIs
> :
>
>
> static void do_intel_finish_page_flip(struct drm_device *dev,
> void intel_finish_page_flip(struct drm_device *dev, int pipe)
> do_intel_finish_page_flip(dev, crtc);
> void intel_finish_page_flip_plane(struct drm_device *dev, int plane)
> do_intel_finish_page_flip(dev, crtc);
> void intel_prepare_page_flip(struct drm_device *dev, int plane)
>  * is also accompanied by a spurious intel_prepare_page_flip().
> inline static void intel_mark_page_flip_active(struct intel_crtc
> *intel_crtc)
>
>
> On Sat, Jan 11, 2014 at 9:27 PM, Sannu K <sannumail4foss@gmail.com> wrote:
>
>> Hi,
>>
>> I would like to access a monitor's content in kernel mode. I tried but
>> could not find a generic way to access CRTC's scan out buffer in kernel
>> mode. I prefer to do it in kernel mode as an experiment. Any pointers will
>> greatly help.
>>
>> Thanks and Regards,
>> Sannu K
>>
>> _______________________________________________
>> Kernelnewbies mailing list
>> Kernelnewbies at kernelnewbies.org
>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>>
>
>
> --
> Regards,
> Peter Teoh
>



-- 
Regards,
Peter Teoh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140116/84303f53/attachment.html 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* How to access a DRM CRTC's scan out buffer?
  2014-01-16  7:44 ` Peter Teoh
  2014-01-16  7:51   ` Peter Teoh
@ 2014-01-16 12:06   ` Sannu K
  2014-01-17  5:38     ` Peter Teoh
  1 sibling, 1 reply; 6+ messages in thread
From: Sannu K @ 2014-01-16 12:06 UTC (permalink / raw)
  To: kernelnewbies

On Thu, Jan 16, 2014 at 1:14 PM, Peter Teoh <htmldeveloper@gmail.com> wrote:

> In general how it worked is explained here:
>
> https://www.kernel.org/doc/htmldocs/drm/drm-kms-init.html
>
> Not sure which is the name of your video card, but I think in general all
> the page flip API should have access to the scan buffer (see link above).
> For Intel these are possible APIs
> :
>
>
Thanks. I was trying to find out a generic way to access the scan out
buffer. The page flip functions looks specific to hardware.


>
> static void do_intel_finish_page_flip(struct drm_device *dev,
> void intel_finish_page_flip(struct drm_device *dev, int pipe)
> do_intel_finish_page_flip(dev, crtc);
> void intel_finish_page_flip_plane(struct drm_device *dev, int plane)
> do_intel_finish_page_flip(dev, crtc);
> void intel_prepare_page_flip(struct drm_device *dev, int plane)
>  * is also accompanied by a spurious intel_prepare_page_flip().
> inline static void intel_mark_page_flip_active(struct intel_crtc
> *intel_crtc)
>
> --
> Regards,
> Peter Teoh
>

It is enough to have a way to get the content of scan out buffer instead of
accessing it directly using a pointer.

Thanks for you help,
Sannu K
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140116/99d9c038/attachment.html 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* How to access a DRM CRTC's scan out buffer?
  2014-01-16 12:06   ` Sannu K
@ 2014-01-17  5:38     ` Peter Teoh
  2014-01-19 15:13       ` Sannu K
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Teoh @ 2014-01-17  5:38 UTC (permalink / raw)
  To: kernelnewbies

As indicated here:

http://www.botchco.com/agd5f/?p=51

the input to CRTC is the framebuffer, and output of CRTC is already
monitor-level information...which is meaningless to you.   So but best bet
is to get it at the framebuffer level?

Correct me if wrong?


On Thu, Jan 16, 2014 at 8:06 PM, Sannu K <sannumail4foss@gmail.com> wrote:

> On Thu, Jan 16, 2014 at 1:14 PM, Peter Teoh <htmldeveloper@gmail.com>wrote:
>
>> In general how it worked is explained here:
>>
>> https://www.kernel.org/doc/htmldocs/drm/drm-kms-init.html
>>
>> Not sure which is the name of your video card, but I think in general all
>> the page flip API should have access to the scan buffer (see link above).
>> For Intel these are possible APIs
>>  :
>>
>>
> Thanks. I was trying to find out a generic way to access the scan out
> buffer. The page flip functions looks specific to hardware.
>
>
>>
>> static void do_intel_finish_page_flip(struct drm_device *dev,
>> void intel_finish_page_flip(struct drm_device *dev, int pipe)
>> do_intel_finish_page_flip(dev, crtc);
>> void intel_finish_page_flip_plane(struct drm_device *dev, int plane)
>> do_intel_finish_page_flip(dev, crtc);
>> void intel_prepare_page_flip(struct drm_device *dev, int plane)
>>  * is also accompanied by a spurious intel_prepare_page_flip().
>> inline static void intel_mark_page_flip_active(struct intel_crtc
>> *intel_crtc)
>>
>> --
>> Regards,
>> Peter Teoh
>>
>
> It is enough to have a way to get the content of scan out buffer instead
> of accessing it directly using a pointer.
>
> Thanks for you help,
> Sannu K
>



-- 
Regards,
Peter Teoh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140117/f78ae4f5/attachment.html 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* How to access a DRM CRTC's scan out buffer?
  2014-01-17  5:38     ` Peter Teoh
@ 2014-01-19 15:13       ` Sannu K
  0 siblings, 0 replies; 6+ messages in thread
From: Sannu K @ 2014-01-19 15:13 UTC (permalink / raw)
  To: kernelnewbies

On Fri, Jan 17, 2014 at 11:08 AM, Peter Teoh <htmldeveloper@gmail.com>wrote:

> As indicated here:
>
> http://www.botchco.com/agd5f/?p=51
>
> the input to CRTC is the framebuffer, and output of CRTC is already
> monitor-level information...which is meaningless to you.   So but best bet
> is to get it at the framebuffer level?
>

Yes. I will look into the code again at the framebuffer level.

Thanks and Regards,
Sannu K
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140119/bfd889b8/attachment.html 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-01-19 15:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-11 13:27 How to access a DRM CRTC's scan out buffer? Sannu K
2014-01-16  7:44 ` Peter Teoh
2014-01-16  7:51   ` Peter Teoh
2014-01-16 12:06   ` Sannu K
2014-01-17  5:38     ` Peter Teoh
2014-01-19 15:13       ` Sannu K

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.