aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-graphics/xorg-xserver
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-graphics/xorg-xserver')
-rw-r--r--meta-amd-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config/amd/xorg.conf107
-rw-r--r--meta-amd-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend51
-rw-r--r--meta-amd-bsp/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend3
3 files changed, 161 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config/amd/xorg.conf b/meta-amd-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config/amd/xorg.conf
new file mode 100644
index 00000000..edb7b36a
--- /dev/null
+++ b/meta-amd-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config/amd/xorg.conf
@@ -0,0 +1,107 @@
+Section "Monitor"
+ Identifier "Monitor0"
+ VendorName "Monitor Vendor"
+ ModelName "Monitor Model"
+EndSection
+
+Section "Device"
+ ### Available Driver options are:-
+ ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
+ ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
+ ### <percent>: "<f>%"
+ ### [arg]: arg optional
+ #Option "NoAccel" # [<bool>]
+ #Option "SWcursor" # [<bool>]
+ #Option "Dac6Bit" # [<bool>]
+ #Option "Dac8Bit" # [<bool>]
+ #Option "BusType" # [<str>]
+ #Option "CPPIOMode" # [<bool>]
+ #Option "CPusecTimeout" # <i>
+ #Option "AGPMode" # <i>
+ #Option "AGPFastWrite" # [<bool>]
+ #Option "AGPSize" # <i>
+ #Option "GARTSize" # <i>
+ #Option "RingSize" # <i>
+ #Option "BufferSize" # <i>
+ #Option "EnableDepthMoves" # [<bool>]
+ #Option "EnablePageFlip" # [<bool>]
+ #Option "NoBackBuffer" # [<bool>]
+ #Option "DMAForXv" # [<bool>]
+ #Option "FBTexPercent" # <i>
+ #Option "DepthBits" # <i>
+ #Option "PCIAPERSize" # <i>
+ #Option "AccelDFS" # [<bool>]
+ #Option "IgnoreEDID" # [<bool>]
+ #Option "CustomEDID" # [<str>]
+ #Option "DisplayPriority" # [<str>]
+ #Option "PanelSize" # [<str>]
+ #Option "ForceMinDotClock" # <freq>
+ #Option "ColorTiling" # [<bool>]
+ #Option "VideoKey" # <i>
+ #Option "RageTheatreCrystal" # <i>
+ #Option "RageTheatreTunerPort" # <i>
+ #Option "RageTheatreCompositePort" # <i>
+ #Option "RageTheatreSVideoPort" # <i>
+ #Option "TunerType" # <i>
+ #Option "RageTheatreMicrocPath" # <str>
+ #Option "RageTheatreMicrocType" # <str>
+ #Option "ScalerWidth" # <i>
+ #Option "RenderAccel" # [<bool>]
+ #Option "SubPixelOrder" # [<str>]
+ #Option "ClockGating" # [<bool>]
+ #Option "VGAAccess" # [<bool>]
+ #Option "ReverseDDC" # [<bool>]
+ #Option "LVDSProbePLL" # [<bool>]
+ Option "AccelMethod" "glamor"
+ #Option "DRI" # [<bool>]
+ #Option "ConnectorTable" # <str>
+ #Option "DefaultConnectorTable" # [<bool>]
+ #Option "DefaultTMDSPLL" # [<bool>]
+ #Option "TVDACLoadDetect" # [<bool>]
+ #Option "ForceTVOut" # [<bool>]
+ #Option "TVStandard" # <str>
+ #Option "IgnoreLidStatus" # [<bool>]
+ #Option "DefaultTVDACAdj" # [<bool>]
+ #Option "Int10" # [<bool>]
+ #Option "EXAVSync" # [<bool>]
+ #Option "ATOMTVOut" # [<bool>]
+ #Option "R4xxATOM" # [<bool>]
+ #Option "ForceLowPowerMode" # [<bool>]
+ #Option "DynamicPM" # [<bool>]
+ #Option "NewPLL" # [<bool>]
+ #Option "ZaphodHeads" # <str>
+ Identifier "Card0"
+ Driver "radeon"
+ BusID "PCI:0:1:0"
+EndSection
+
+Section "Screen"
+ Identifier "Screen0"
+ Device "Card0"
+ Monitor "Monitor0"
+ SubSection "Display"
+ Viewport 0 0
+ Depth 1
+ EndSubSection
+ SubSection "Display"
+ Viewport 0 0
+ Depth 4
+ EndSubSection
+ SubSection "Display"
+ Viewport 0 0
+ Depth 8
+ EndSubSection
+ SubSection "Display"
+ Viewport 0 0
+ Depth 15
+ EndSubSection
+ SubSection "Display"
+ Viewport 0 0
+ Depth 16
+ EndSubSection
+ SubSection "Display"
+ Viewport 0 0
+ Depth 24
+ EndSubSection
+EndSection
+
diff --git a/meta-amd-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend b/meta-amd-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
new file mode 100644
index 00000000..0c0d1067
--- /dev/null
+++ b/meta-amd-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
@@ -0,0 +1,51 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+# Additional options that you want
+# to set in final xorg configuration.
+# Convention is option,value. If there's
+# no value requred simply skip just
+# like DRI3.
+AMDGPU_OPTS = "DRI3, TearFree,on"
+RADEON_OPTS = ""
+
+do_install_append_amdgpu () {
+ if [ "${RT_KERNEL_AMD}" = "yes" ]; then
+ sed -i -e 's/^\tDriver "radeon"/\tDriver "fbdev"/' ${D}/${sysconfdir}/X11/xorg.conf
+ sed -i -e 's/^\tDriver "amdgpu"/\tDriver "fbdev"/' ${D}/${sysconfdir}/X11/xorg.conf
+ else
+ sed -i -e 's/^\tDriver "radeon"/\tDriver "amdgpu"/' ${D}/${sysconfdir}/X11/xorg.conf
+ sed -i -e 's/^\tDriver "fbdev"/\tDriver "amdgpu"/' ${D}/${sysconfdir}/X11/xorg.conf
+ set_xorg_opts "${AMDGPU_OPTS}"
+ fi
+}
+
+do_install_append_radeon () {
+ if [ "${RT_KERNEL_AMD}" = "yes" ]; then
+ sed -i -e 's/^\tDriver "radeon"/\tDriver "fbdev"/' ${D}/${sysconfdir}/X11/xorg.conf
+ sed -i -e 's/^\tDriver "amdgpu"/\tDriver "fbdev"/' ${D}/${sysconfdir}/X11/xorg.conf
+ else
+ sed -i -e 's/^\tDriver "amdgpu"/\tDriver "radeon"/' ${D}/${sysconfdir}/X11/xorg.conf
+ sed -i -e 's/^\tDriver "fbdev"/\tDriver "radeon"/' ${D}/${sysconfdir}/X11/xorg.conf
+ set_xorg_opts "${RADEON_OPTS}"
+ fi
+}
+
+set_xorg_opts() {
+ for opt_val in ${1}; do
+ opt=$(echo ${opt_val} | cut -d',' -f1)
+ val=$(echo ${opt_val} | cut -d',' -f2)
+ if [ "${val}" = "" ]; then
+ sed -i -e "/^\tIdentifier \"Card0\"/i \\\tOption \"${opt}\"" ${D}/${sysconfdir}/X11/xorg.conf
+ else
+ sed -i -e "/^\tIdentifier \"Card0\"/i \\\tOption \"${opt}\" \"${val}\"" ${D}/${sysconfdir}/X11/xorg.conf
+ fi
+ done
+}
+
+do_install_append_r1000 () {
+ sed -i -e 's/^\tBusID "PCI:0:1:0"/\t#BusID "PCI:1:0:0"/' ${D}/${sysconfdir}/X11/xorg.conf
+}
+
+do_install_append_v1000 () {
+ sed -i -e 's/^\tBusID "PCI:0:1:0"/\t#BusID "PCI:1:0:0"/' ${D}/${sysconfdir}/X11/xorg.conf
+}
diff --git a/meta-amd-bsp/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend b/meta-amd-bsp/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend
new file mode 100644
index 00000000..9f8848f4
--- /dev/null
+++ b/meta-amd-bsp/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend
@@ -0,0 +1,3 @@
+PACKAGECONFIG[glamor] = "--enable-glamor,--disable-glamor,libepoxy"
+PACKAGECONFIG_append_amdgpu = " glamor xshmfence dri3"
+PACKAGECONFIG_append_radeon = " glamor xshmfence"