{"action":"opened","issue":{"url":"https://api.github.com/repos/anholt/linux/issues/38","repository_url":"https://api.github.com/repos/anholt/linux","labels_url":"https://api.github.com/repos/anholt/linux/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/anholt/linux/issues/38/comments","events_url":"https://api.github.com/repos/anholt/linux/issues/38/events","html_url":"https://github.com/anholt/linux/issues/38","id":159783358,"number":38,"title":"KMS/DRM: Are we losing hardware-accelerated blitting?","user":{"login":"vanfanel","id":837585,"avatar_url":"https://avatars.githubusercontent.com/u/837585?v=3","gravatar_id":"","url":"https://api.github.com/users/vanfanel","html_url":"https://github.com/vanfanel","followers_url":"https://api.github.com/users/vanfanel/followers","following_url":"https://api.github.com/users/vanfanel/following{/other_user}","gists_url":"https://api.github.com/users/vanfanel/gists{/gist_id}","starred_url":"https://api.github.com/users/vanfanel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanfanel/subscriptions","organizations_url":"https://api.github.com/users/vanfanel/orgs","repos_url":"https://api.github.com/users/vanfanel/repos","events_url":"https://api.github.com/users/vanfanel/events{/privacy}","received_events_url":"https://api.github.com/users/vanfanel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-11T17:16:37Z","updated_at":"2016-06-11T17:16:37Z","closed_at":null,"body":"Hi,\r\n\r\nI have been porting published and popular programs (RetroArch, Scummvm, and a long etc) to use the dispmanx API for years now.\r\nHowever, dispmanx should, sooner or later, be superseeded by KMS/DRM, so I am porting RetroArch to it.\r\n\r\nWith dispmanx, things were easy for blitting. Let's say I want to copy a 256x256 rect for a 298x256 buffer to a dismanx \"resource\" (buffer). Well, I have this GREAT dispmanx function for that:\r\n\r\nvc_dispmanx_resource_write_data( DISPMANX_RESOURCE_HANDLE_T res, VC_IMAGE_TYPE_T src_type, int src_pitch, void * src_address, const VC_RECT_T * rect );\r\n\r\nYou see, I can pass a pitch, let's say 256*4 if I am blitting a pixel array with 4 bytes per pixel, and then it will be uploaded to the GPU without using the CPU for the transfer. Very fast and good solution!\r\n\r\nBut in KMS, using a dumb buffer, without an specific function to do it, I would have to copy a pitch of pixels each line, so in 256 lines I would be calling memcpy() 256 times to archieve the same. And that's for small rect...\r\n\r\nSo, I have seen that /usr/include/drm contains some hardware-specific implementations of blitting functions. Is there something similar on the Pi? I don't mind using IOCTLs or whatever is needed...\r\n"}}
{"actor":{"display_login":"vanfanel"}}