Code Monkey home page Code Monkey logo

xf86-video-armsoc's Introduction

xf86-video-armsoc
Open-source X.org graphics driver for ARM graphics

DRM driver selection
--------------------
While most operations use only the standard DRM modesetting interfaces, certain operations
unavoidably rely on specific driver behaviour (including dumb buffer allocation flags and cursor
plane z-ordering). As such, the armsoc driver must be configured for a particular DRM driver.

The currently supported DRM drivers are:
- pl111
- exynos

To configure armsoc for one of these, pass the --with-drmmode option to ./configure. For example:

$ ./configure --with-drmmode=pl111

For other drivers, you will need to implement this support yourself. A template implementation is
provided in src/drmmode_template which can be built by passing --with-drmmode=template to ./configure.
The interface is defined and documented in src/drmmode_driver.h, and you should refer to this while
modifying the template to set up your DRM driver's abstraction appropriately.

You can also copy src/drmmode_template into src/drmmode_<yourdrivername> and build with:

$ ./configure --with-drmmode=<yourdrivername>


Summary of bo reference counting
--------------------------------
The Screen takes a ref on the scanout bo in InitScreen and drops it in ScreenClose. When the scanout bo changes
(due to a flip or a modeset) the ref is moved from the old bo to the new one by set_scanout_bo.

Pixmaps take a ref on their bo(s) when created in ARMSOCCreatePixmap2 and drop it in ARMSOCDestroyPixmap.
If ARMSOCModifyPixmapHeader points a pixmap at anything other than the scanout bo then the ref to
the existing bo (if any) is dropped.
If ARMSOCModifyPixmapHeader points a pixmap at the scanout bo the ref is moved from the old bo to the new
If ARMSOCModifyPixmapHeader changes the size of the pixmap's bo the ref is dropped, a new bo created and a
ref taken on that.

resize_scanout_bo creates and takes a ref on the new bo and drops its ref when the new bo becomes the scanout bo and
the Screen has taken a ref.

The swap chain takes a ref on the src and dst bos when a swap is scheduled in ARMSOCDRI2ScheduleSwap and drops them
in ARMSOCDRI2SwapComplete after the src becomes pARMSOC->scanout and the screen takes a ref. 

The cursor takes a ref on its bo in drmmode_cursor_init and drops it in drmmode_cursor_fini




xf86-video-armsoc's People

Contributors

atseanpaul avatar cooperyuan avatar djkurtz avatar eskilsund avatar marcheu avatar nullr0ute avatar paulgeary avatar raysmith-arm avatar robclark avatar robwang-arm avatar sunsun02 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

xf86-video-armsoc's Issues

Figure out what to do about create_custom_gem in the rockchip part

Currently the (stolen from ChromeOS) rockchip-drm-ioctl called from create_custom_gem currently does (exactly?) the same as the dumb_create callback of the rockchip drm driver. So it could possibly be calling this one, instead of defining a new ioctl.

But in [0] Dave Airlie was quite vehemently stating:
"DON'T USE DUMB BUFFERS FOR ALLOCATING BUFFERS USED FOR ACCELERATION."
and although there was an answer from a developer of the armsoc X-Server the discussion did not seem to reach any conclusion.

So, figure out what the correct path is here. Either we can use the dumb interface, should define this similar new ioctl, or maybe the ioctl even needs more functionality of some sort?

[0] http://lists.freedesktop.org/archives/dri-devel/2013-April/037823.html

NotifyFd support and some other merges

To work with newer xorg (ABI_VIDEODRV_VERSION 23), armsoc needs to use NotifyFd instead of AddGeneralSocket. This change is in @RaumZeit 's repository in commit RaumZeit@36709c6

Is there a plan to merge things back into a single repository? I am willing to split the work in @RaumZeit 's repository into individual clean pull requests if that would help move things along.

AIGLX error with RK3066

I just installed this driver (devel/rockchip branch), but it sames failed. The parts of xorg log showing as here.

[ 79764.667] (II) No BusID or DriverName specified - opening /dev/dri/card0
[ 79764.667] (II) Got BusID platform:mali_drm
[ 79764.667] (II) Opened DRM
[ 79764.667] (II)    DeviceName is [/dev/dri/card0]
[ 79764.667] (II)    bus_id is [platform:mali_drm]
[ 79764.667] (II)    DriverName is [mali_drm]
[ 79764.667] (II)    version is [0.1.0]
[ 79764.667] (II) Screen:0,  CRTC:-1
[ 79764.668] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[ 79764.668] (II) ARMSOC(0): Creating default Display subsection in Screen section
        "Default Screen Section" for depth/fbbpp 24/32
[ 79764.668] (==) ARMSOC(0): Depth 24, (==) framebuffer bpp 32
[ 79764.668] (==) ARMSOC(0): RGB weight 888
[ 79764.668] (==) ARMSOC(0): Using gamma correction (1.0, 1.0, 1.0)
[ 79764.668] (==) ARMSOC(0): Default visual is TrueColor
[ 79764.668] (II) No BusID or DriverName specified - opening /dev/dri/card0
[ 79764.668] (II) Got BusID platform:mali_drm
[ 79764.668] (II) Opened DRM
[ 79764.668] (II)    DeviceName is [/dev/dri/card0]
[ 79764.668] (II)    bus_id is [platform:mali_drm]
[ 79764.668] (II)    DriverName is [mali_drm]
[ 79764.668] (II)    version is [0.1.0]
[ 79764.668] (II) UnloadModule: "armsoc"
[ 79764.668] (EE) Screen(s) found, but none have a usable configuration.
[ 79764.668] (EE)
Fatal server error:
[ 79764.668] (EE) no screens found(EE)
[ 79764.668] (EE)

Would you please give any idea to fix this?

Here's some extra information.
Board: Marsboard RK3066
OS: Debian 8.5
kernel: rockchip-marsboard-rk3066-linux-3.0.8
mali kernel driver: integrated to the kernel. version r3p2.
sunxi-mali installed with VERSION=r3p2-01rel1

xorg.conf:

Section "Device"
        Identifier      "RK3016 FBDEV"
        Driver          "armsoc"
EndSection

I've tried various Screen settings, but all failed.

armsoc needs to get the DRM file descriptor from the Xorg server

Sometimes xorg opens the DRM device (i.e. /dev/dri/card0) and doesn't close it, before ARMSOCProbe() gets called. Then when ARMSOCOpenDRMCard() is called, it does not open it as the master, and drmSetInterfaceVersion() fails. This is happening to me because xorg (running as non-root) gets the file descriptor from systemd-logind.

I think the correct solution is to implement DriverRec.platformProbe(), and if the XF86_PDEV_SERVER_FD flag is set, it should save the file descriptor provided in xf86_platform_device->attribs->fd. It also needs to implement any DRICard/BusId/DriverName matching in this function. I will be making these changes soon for my own use.

I'm worried about unmerged commits in issue #3 - which repository should I base my changes on so they can be merged?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.