From: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
To: Daniel Vetter <daniel@ffwll.ch>,
Haneen Mohammed <hamohammed.sa@gmail.com>,
David Airlie <airlied@linux.ie>, Simon Ser <contact@emersion.fr>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] drm/vkms: Introduce basic support for configfs
Date: Mon, 1 Jul 2019 00:23:39 -0300 [thread overview]
Message-ID: <cover.1561950553.git.rodrigosiqueiramelo@gmail.com> (raw)
This patchset introduces the support for configfs in vkms by adding a
primary structure for handling the vkms subsystem and exposing
connectors as a use case. This series allows enabling/disabling virtual
and writeback connectors on the fly. The first patch of this series
reworks the initialization and cleanup code of each type of connector,
with this change, the second patch adds the configfs support for vkms.
It is important to highlight that this patchset depends on
https://patchwork.freedesktop.org/series/61738/.
After applying this series, the user can utilize these features with the
following steps:
1. Load vkms without parameter
modprobe vkms
2. Mount a configfs filesystem
mount -t configfs none /mnt/
After that, the vkms subsystem will look like this:
vkms/
|__connectors
|__Virtual
|__ enable
The connectors directories have information related to connectors, and
as can be seen, the virtual connector is enabled by default. Inside a
connector directory (e.g., Virtual) has an attribute named ‘enable’
which is used to enable and disable the target connector. For example,
the Virtual connector has the enable attribute set to 1. If the user
wants to enable the writeback connector it is required to use the mkdir
command, as follows:
cd /mnt/vkms/connectors
mkdir Writeback
After the above command, the writeback connector will be enabled, and
the user could see the following tree:
vkms/
|__connectors
|__Virtual
| |__ enable
|__Writeback
|__ enable
If the user wants to remove the writeback connector, it is required to
use the command rmdir, for example
rmdir Writeback
Another way to enable and disable a connector it is by using the enable
attribute, for example, we can disable the Virtual connector with:
echo 0 > /mnt/vkms/connectors/Virtual/enable
And enable it again with:
echo 1 > /mnt/vkms/connectors/Virtual/enable
It is important to highlight that configfs 'obey' the parameters used
during the vkms load and does not allow users to remove a connector
directory if it was load via module parameter. For example:
modprobe vkms enable_writeback=1
vkms/
|__connectors
|__Virtual
| |__ enable
|__Writeback
|__ enable
If the user tries to remove the Writeback connector with “rmdir
Writeback”, the operation will be not permitted because the Writeback
connector was loaded with the modules. However, the user may disable the
writeback connector with:
echo 0 > /mnt/vkms/connectors/Writeback/enable
Rodrigo Siqueira (2):
drm/vkms: Add enable/disable functions per connector
drm/vkms: Introduce configfs for enabling/disabling connectors
drivers/gpu/drm/vkms/Makefile | 3 +-
drivers/gpu/drm/vkms/vkms_configfs.c | 229 ++++++++++++++++++++++++++
drivers/gpu/drm/vkms/vkms_drv.c | 6 +
drivers/gpu/drm/vkms/vkms_drv.h | 17 ++
drivers/gpu/drm/vkms/vkms_output.c | 84 ++++++----
drivers/gpu/drm/vkms/vkms_writeback.c | 31 +++-
6 files changed, 332 insertions(+), 38 deletions(-)
create mode 100644 drivers/gpu/drm/vkms/vkms_configfs.c
--
2.21.0
--
Rodrigo Siqueira
https://siqueira.tech
next reply other threads:[~2019-07-01 3:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-01 3:23 Rodrigo Siqueira [this message]
2019-07-01 3:24 ` [PATCH 1/2] drm/vkms: Add enable/disable functions per connector Rodrigo Siqueira
2019-07-01 3:24 ` [PATCH 2/2] drm/vkms: Introduce configfs for enabling/disabling connectors Rodrigo Siqueira
2019-07-10 17:01 ` [PATCH 0/2] drm/vkms: Introduce basic support for configfs Daniel Vetter
2019-07-12 3:07 ` Rodrigo Siqueira
2019-07-15 11:09 ` Vasilev, Oleg
2019-07-16 8:51 ` Daniel Vetter
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=cover.1561950553.git.rodrigosiqueiramelo@gmail.com \
--to=rodrigosiqueiramelo@gmail.com \
--cc=airlied@linux.ie \
--cc=contact@emersion.fr \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=hamohammed.sa@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox