In text mode, instead of blanking the screen and shutting it down, it
is instead painted white, backlight going full steam.
I have bisected the code and git tells me the first bad commit is
f3728734ba78310525bf4a361c7787c7c6fa5d40.
Apparently my laptop, despite having atom tables, still needs legacy
backlight controls. Or whatever.
----------------------------------------------------------
drm/radeon: add backlight control for atom devices (v2)
On systems that use the build in GPU backlight …
[View More]controller,
we can use atom tables to change the brightness level.
v2: use firmware flags
----------------------------------------------------------
And the details at
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h…
I was first enthusiastic about using some textmode goodness, but
unfortunately have to return to X11, under it everything works okay,
strange but true.
[View Less]
When crtc_funcs->dpms callback is called, exynos_crtc->dpms
and exynos_encoder->dpms are changed to new mode. But if user
requests dpms mode operation, OFF -> ON, when crtc's dpms callback
is called, exynos_encoder->dpms is also changed to ON. This
makes encoder's dpms callback call be ignored so display power
couldn't become on again.
This patch removes exynos_encoder->dpms changing and adds 'updated'
variable to exynos_drm_encoder structure to avoid duplicated overlay
…
[View More]updating.
Signed-off-by: Inki Dae <inki.dae(a)samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park(a)samsung.com>
---
drivers/gpu/drm/exynos/exynos_drm_connector.c | 1 +
drivers/gpu/drm/exynos/exynos_drm_encoder.c | 33 +++++++++++++------------
2 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_connector.c b/drivers/gpu/drm/exynos/exynos_drm_connector.c
index 18c2718..0f68a28 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_connector.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_connector.c
@@ -374,6 +374,7 @@ struct drm_connector *exynos_drm_connector_create(struct drm_device *dev,
exynos_connector->encoder_id = encoder->base.id;
exynos_connector->manager = manager;
exynos_connector->dpms = DRM_MODE_DPMS_OFF;
+ connector->dpms = DRM_MODE_DPMS_OFF;
connector->encoder = encoder;
err = drm_mode_connector_attach_encoder(connector, encoder);
diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.c b/drivers/gpu/drm/exynos/exynos_drm_encoder.c
index e51503f..241ad1e 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_encoder.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_encoder.c
@@ -43,12 +43,14 @@
* @manager: specific encoder has its own manager to control a hardware
* appropriately and we can access a hardware drawing on this manager.
* @dpms: store the encoder dpms value.
+ * @updated: indicate whether overlay data updating is needed or not.
*/
struct exynos_drm_encoder {
struct drm_crtc *old_crtc;
struct drm_encoder drm_encoder;
struct exynos_drm_manager *manager;
- int dpms;
+ int dpms;
+ bool updated;
};
static void exynos_drm_connector_power(struct drm_encoder *encoder, int mode)
@@ -85,7 +87,9 @@ static void exynos_drm_encoder_dpms(struct drm_encoder *encoder, int mode)
switch (mode) {
case DRM_MODE_DPMS_ON:
if (manager_ops && manager_ops->apply)
- manager_ops->apply(manager->dev);
+ if (!exynos_encoder->updated)
+ manager_ops->apply(manager->dev);
+
exynos_drm_connector_power(encoder, mode);
exynos_encoder->dpms = mode;
break;
@@ -94,6 +98,7 @@ static void exynos_drm_encoder_dpms(struct drm_encoder *encoder, int mode)
case DRM_MODE_DPMS_OFF:
exynos_drm_connector_power(encoder, mode);
exynos_encoder->dpms = mode;
+ exynos_encoder->updated = false;
break;
default:
DRM_ERROR("unspecified mode %d\n", mode);
@@ -205,13 +210,22 @@ static void exynos_drm_encoder_prepare(struct drm_encoder *encoder)
static void exynos_drm_encoder_commit(struct drm_encoder *encoder)
{
- struct exynos_drm_manager *manager = exynos_drm_get_manager(encoder);
+ struct exynos_drm_encoder *exynos_encoder = to_exynos_encoder(encoder);
+ struct exynos_drm_manager *manager = exynos_encoder->manager;
struct exynos_drm_manager_ops *manager_ops = manager->ops;
DRM_DEBUG_KMS("%s\n", __FILE__);
if (manager_ops && manager_ops->commit)
manager_ops->commit(manager->dev);
+
+ /*
+ * this will avoid one issue that overlay data is updated to
+ * real hardware two times.
+ * And this variable will be used to check if the data was
+ * already updated or not by exynos_drm_encoder_dpms function.
+ */
+ exynos_encoder->updated = true;
}
static void exynos_drm_encoder_disable(struct drm_encoder *encoder)
@@ -401,19 +415,6 @@ void exynos_drm_encoder_crtc_dpms(struct drm_encoder *encoder, void *data)
manager_ops->dpms(manager->dev, mode);
/*
- * set current mode to new one so that data aren't updated into
- * registers by drm_helper_connector_dpms two times.
- *
- * in case that drm_crtc_helper_set_mode() is called,
- * overlay_ops->commit() and manager_ops->commit() callbacks
- * can be called two times, first at drm_crtc_helper_set_mode()
- * and second at drm_helper_connector_dpms().
- * so with this setting, when drm_helper_connector_dpms() is called
- * encoder->funcs->dpms() will be ignored.
- */
- exynos_encoder->dpms = mode;
-
- /*
* if this condition is ok then it means that the crtc is already
* detached from encoder and last function for detaching is properly
* done, so clear pipe from manager to prevent repeated call.
--
1.7.4.1
[View Less]
Hi All.
I am responsible for a display part from Samsung Electronics Telecommunication Division.
and I am going to add post-processing features in exynos drm.
If you have some opinion of this patch,
please give some comments about my patch.
IPP is stands for Image Post Processing and supports image scaler/rotator
and input/output DMA operations using IPP drivers(FIMC, Rotator, GSC, SC, so on.)
IPP is integration device driver of same attibute hardware.
IPP drivers supports Memory to Memory …
[View More]operations with various converting.
and some drivers supports Writeback and Display output operations using local path.
User can make converted image using this driver.
and also supports streaming concept for multimedia data processing.
And supports various operations
1. Scale operation generates various sizes of image.
2. CSC(Color Space Conversion) operation supports format converting.
3. Crop operation supports cutting the image.
4. Rotate operation supports to 90, 180, 270 degree.
5. Flip operation supports to vertical, horizontal, and both.
6. Writeback operation genertates cloned image from display controller(FIMD).
7. Display output operation support various format display to display controller(FIMD).
8. Input DMA reads image data from the memory.
9. Output DMA writes image data to memory.
10. Supports image effect functions.
Descriptions)
User should make property informations and set this property to registers.
and IPP subsystem manages property id using command node and make queue list using memory node.
IPP subsystem supports register function of IPP drivers.
IPP driver manages input/output DMA with various operations. and some driver supports
optional operations(writeback, output).
IPP driver needs various informations, so User set property information to IPP driver.
and also IPP driver needs memory base address of image for various operations.
User doesn't know its address, so fills the gem handle of that memory than address of image base.
and than IPP driver start operation.
We adds four ioctls and one event for IPP subsystem.
Basic control flow is same as below
Open -> Get properties -> User choose IPP driver and set property information -> Set Property -> Create gem handle ->
Queue buffer(Enqueue) of source/destination -> Command control(Play) -> Event occured to User
-> User handle converted image -> (Queue buffer(Enqueue) of source/destination -> Event occured to User)*N ->
Queue buffer(Dequeue) of source/destination -> Command control(Stop) -> Free gem handle -> Close
- ioctls
DRM_EXYNOS_IPP_GET_PROPERTY : get ipp driver capabilitis and id.
DRM_EXYNOS_IPP_SET_PROPERTY : set format, position, rotation, flip about source/destination.
DRM_EXYNOS_IPP_QUEUE_BUF : enqueue/dequeue buffer and make event list.
DRM_EXYNOS_IPP_CMD_CTRL : play/stop/pause/resume control.
- event
DRM_EXYNOS_IPP_EVENT : event to give notification completion of buffer DMA with buffer list
Eunchul Kim (4):
drm/exynos: add ipp subsystem
drm/exynos: add fimc ipp driver
drm/exynos: add rotator ipp driver
drm/exynos: add gsc ipp driver
drivers/gpu/drm/exynos/Kconfig | 24 +
drivers/gpu/drm/exynos/Makefile | 4 +
drivers/gpu/drm/exynos/exynos_drm_drv.c | 69 +
drivers/gpu/drm/exynos/exynos_drm_drv.h | 10 +
drivers/gpu/drm/exynos/exynos_drm_fimc.c | 2041 +++++++++++++++++++++++++++
drivers/gpu/drm/exynos/exynos_drm_fimc.h | 35 +
drivers/gpu/drm/exynos/exynos_drm_gsc.c | 1476 +++++++++++++++++++
drivers/gpu/drm/exynos/exynos_drm_gsc.h | 35 +
drivers/gpu/drm/exynos/exynos_drm_ipp.c | 1937 +++++++++++++++++++++++++
drivers/gpu/drm/exynos/exynos_drm_ipp.h | 268 ++++
drivers/gpu/drm/exynos/exynos_drm_rotator.c | 801 +++++++++++
drivers/gpu/drm/exynos/exynos_drm_rotator.h | 13 +
drivers/gpu/drm/exynos/regs-fimc.h | 669 +++++++++
drivers/gpu/drm/exynos/regs-gsc.h | 295 ++++
drivers/gpu/drm/exynos/regs-rotator.h | 73 +
include/drm/exynos_drm.h | 33 +
include/uapi/drm/exynos_drm.h | 189 +++
17 files changed, 7972 insertions(+), 0 deletions(-)
create mode 100644 drivers/gpu/drm/exynos/exynos_drm_fimc.c
create mode 100644 drivers/gpu/drm/exynos/exynos_drm_fimc.h
create mode 100644 drivers/gpu/drm/exynos/exynos_drm_gsc.c
create mode 100644 drivers/gpu/drm/exynos/exynos_drm_gsc.h
create mode 100644 drivers/gpu/drm/exynos/exynos_drm_ipp.c
create mode 100644 drivers/gpu/drm/exynos/exynos_drm_ipp.h
create mode 100644 drivers/gpu/drm/exynos/exynos_drm_rotator.c
create mode 100644 drivers/gpu/drm/exynos/exynos_drm_rotator.h
create mode 100644 drivers/gpu/drm/exynos/regs-fimc.h
create mode 100644 drivers/gpu/drm/exynos/regs-gsc.h
create mode 100644 drivers/gpu/drm/exynos/regs-rotator.h
[View Less]
https://bugs.freedesktop.org/show_bug.cgi?id=26294
--- Comment #26 from Paul Menzel <paulepanter(a)users.sourceforge.net> ---
(In reply to comment #0)
[…]
> connecting a Philips 32PFL5404H [1] to the ASUS EeePC 701 4G worked with
> version 2.8 and maybe even 2.9.0 of the Intel driver. With 2.9.1 it does not
> work anymore and I get a similar picture as in [2] (different monitor).
In #intel-gfx on irc.freenode.net ajax suggested, to test it with VESA.
Unfortunately I could not …
[View More]test that yet, because I had forgotten to install
`xserver-xorg-video-vesa`. But KMS seems to be the culprit indeed. Checking the
Debian changelog around the time this issue started to appear [3], KMS was
enabled by installing `/etc/modprobe.d/i915-kms.conf` enabling KMS.
xserver-xorg-video-intel (2:2.9.1-2) unstable; urgency=low
* Upload to unstable.
-- Julien Cristau <jcristau(a)debian.org> Thu, 07 Jan 2010 20:53:45 +0000
xserver-xorg-video-intel (2:2.9.1-1+exp1) experimental; urgency=low
[ Julien Cristau ]
* Enable kernel mode setting by default on linux (closes: #555906).
[ Brice Goglin ]
* Build against xserver 1.7.
-- Brice Goglin <bgoglin(a)debian.org> Wed, 02 Dec 2009 15:50:17 +0100
[…]
[3]
http://packages.debian.org/changelogs/pool/main/x/xserver-xorg-video-intel/…
--
You are receiving this mail because:
You are the assignee for the bug.
[View Less]
From: "Luis R. Rodriguez" <mcgrof(a)do-not-panic.com>
Here are a few minor updates to the UAPI changes [0]. The first
one is to help with the backport effort [1], the second one is
simply space cosmetic change to address my eyes bleeding
while reviewing the changes on next-20121012 with git.
If the changes on the first patch make sense perhaps similar
changes can be done for the other subsystem in similar cases.
In those cases the now kernel API header file no longer exists
so even if …
[View More]userspace were using the files the only way to pick
the header up would have been to provide the new uapi path.
[0] http://lwn.net/Articles/507794/
[1] https://backports.wiki.kernel.org
Luis R. Rodriguez (2):
uapi: update includes for drm content when no kernel API exists
uapi: remove trailing spaces
drivers/gpu/drm/drm_crtc.c | 2 +-
drivers/gpu/drm/nouveau/nv04_cursor.c | 2 +-
drivers/staging/omapdrm/omap_crtc.c | 2 +-
include/drm/drmP.h | 4 ++--
include/drm/drm_crtc.h | 4 ++--
include/uapi/asm-generic/siginfo.h | 4 ++--
include/uapi/asm-generic/statfs.h | 4 ++--
include/uapi/drm/drm.h | 2 +-
include/uapi/drm/radeon_drm.h | 2 +-
9 files changed, 13 insertions(+), 13 deletions(-)
--
1.7.10.4
[View Less]
From: Rob Clark <rob(a)ti.com>
A helper that drivers can use to send vblank event after a pageflip.
If the driver doesn't support proper vblank irq based time/seqn then
just pass -1 for the pipe # to get do_gettimestamp() behavior (since
there are a lot of drivers that don't use drm_vblank_count_and_time())
Also an internal send_vblank_event() helper for the various other code
paths within drm_irq that also need to send vblank events.
v1: original
v2: add back 'vblwait->reply.…
[View More]sequence = seq' which should not have
been deleted
v3: add WARN_ON() in case lock is not held and comments
v4: use WARN_ON_SMP() instead to fix issue with !SMP && !DEBUG_SPINLOCK
as pointed out by Marcin Slusarz
v5: update docbook
Signed-off-by: Rob Clark <rob(a)ti.com>
---
Documentation/DocBook/drm.tmpl | 20 +++--------
drivers/gpu/drm/drm_irq.c | 74 ++++++++++++++++++++++++++++------------
include/drm/drmP.h | 2 ++
3 files changed, 59 insertions(+), 37 deletions(-)
diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/drm.tmpl
index b030052..c9cbb3f 100644
--- a/Documentation/DocBook/drm.tmpl
+++ b/Documentation/DocBook/drm.tmpl
@@ -1141,23 +1141,13 @@ int max_width, max_height;</synopsis>
the <methodname>page_flip</methodname> operation will be called with a
non-NULL <parameter>event</parameter> argument pointing to a
<structname>drm_pending_vblank_event</structname> instance. Upon page
- flip completion the driver must fill the
- <parameter>event</parameter>::<structfield>event</structfield>
- <structfield>sequence</structfield>, <structfield>tv_sec</structfield>
- and <structfield>tv_usec</structfield> fields with the associated
- vertical blanking count and timestamp, add the event to the
- <parameter>drm_file</parameter> list of events to be signaled, and wake
- up any waiting process. This can be performed with
+ flip completion the driver must call <methodname>drm_send_vblank_event</methodname>
+ to fill in the event and send to wake up any waiting processes.
+ This can be performed with
<programlisting><![CDATA[
- struct timeval now;
-
- event->event.sequence = drm_vblank_count_and_time(..., &now);
- event->event.tv_sec = now.tv_sec;
- event->event.tv_usec = now.tv_usec;
-
spin_lock_irqsave(&dev->event_lock, flags);
- list_add_tail(&event->base.link, &event->base.file_priv->event_list);
- wake_up_interruptible(&event->base.file_priv->event_wait);
+ ...
+ drm_send_vblank_event(dev, pipe, event);
spin_unlock_irqrestore(&dev->event_lock, flags);
]]></programlisting>
</para>
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index 076c4a8..9bdcfd5 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -802,6 +802,46 @@ u32 drm_vblank_count_and_time(struct drm_device *dev, int crtc,
}
EXPORT_SYMBOL(drm_vblank_count_and_time);
+static void send_vblank_event(struct drm_device *dev,
+ struct drm_pending_vblank_event *e,
+ unsigned long seq, struct timeval *now)
+{
+ WARN_ON_SMP(!spin_is_locked(&dev->event_lock));
+ e->event.sequence = seq;
+ e->event.tv_sec = now->tv_sec;
+ e->event.tv_usec = now->tv_usec;
+
+ list_add_tail(&e->base.link,
+ &e->base.file_priv->event_list);
+ wake_up_interruptible(&e->base.file_priv->event_wait);
+ trace_drm_vblank_event_delivered(e->base.pid, e->pipe,
+ e->event.sequence);
+}
+
+/**
+ * drm_send_vblank_event - helper to send vblank event after pageflip
+ * @dev: DRM device
+ * @crtc: CRTC in question
+ * @e: the event to send
+ *
+ * Updates sequence # and timestamp on event, and sends it to userspace.
+ * Caller must hold event lock.
+ */
+void drm_send_vblank_event(struct drm_device *dev, int crtc,
+ struct drm_pending_vblank_event *e)
+{
+ struct timeval now;
+ unsigned int seq;
+ if (crtc >= 0) {
+ seq = drm_vblank_count_and_time(dev, crtc, &now);
+ } else {
+ seq = 0;
+ do_gettimeofday(&now);
+ }
+ send_vblank_event(dev, e, seq, &now);
+}
+EXPORT_SYMBOL(drm_send_vblank_event);
+
/**
* drm_update_vblank_count - update the master vblank counter
* @dev: DRM device
@@ -936,6 +976,13 @@ void drm_vblank_put(struct drm_device *dev, int crtc)
}
EXPORT_SYMBOL(drm_vblank_put);
+/**
+ * drm_vblank_off - disable vblank events on a CRTC
+ * @dev: DRM device
+ * @crtc: CRTC in question
+ *
+ * Caller must hold event lock.
+ */
void drm_vblank_off(struct drm_device *dev, int crtc)
{
struct drm_pending_vblank_event *e, *t;
@@ -955,15 +1002,9 @@ void drm_vblank_off(struct drm_device *dev, int crtc)
DRM_DEBUG("Sending premature vblank event on disable: \
wanted %d, current %d\n",
e->event.sequence, seq);
-
- e->event.sequence = seq;
- e->event.tv_sec = now.tv_sec;
- e->event.tv_usec = now.tv_usec;
+ list_del(&e->base.link);
drm_vblank_put(dev, e->pipe);
- list_move_tail(&e->base.link, &e->base.file_priv->event_list);
- wake_up_interruptible(&e->base.file_priv->event_wait);
- trace_drm_vblank_event_delivered(e->base.pid, e->pipe,
- e->event.sequence);
+ send_vblank_event(dev, e, seq, &now);
}
spin_unlock_irqrestore(&dev->vbl_lock, irqflags);
@@ -1107,15 +1148,9 @@ static int drm_queue_vblank_event(struct drm_device *dev, int pipe,
e->event.sequence = vblwait->request.sequence;
if ((seq - vblwait->request.sequence) <= (1 << 23)) {
- e->event.sequence = seq;
- e->event.tv_sec = now.tv_sec;
- e->event.tv_usec = now.tv_usec;
drm_vblank_put(dev, pipe);
- list_add_tail(&e->base.link, &e->base.file_priv->event_list);
- wake_up_interruptible(&e->base.file_priv->event_wait);
+ send_vblank_event(dev, e, seq, &now);
vblwait->reply.sequence = seq;
- trace_drm_vblank_event_delivered(current->pid, pipe,
- vblwait->request.sequence);
} else {
/* drm_handle_vblank_events will call drm_vblank_put */
list_add_tail(&e->base.link, &dev->vblank_event_list);
@@ -1256,14 +1291,9 @@ static void drm_handle_vblank_events(struct drm_device *dev, int crtc)
DRM_DEBUG("vblank event on %d, current %d\n",
e->event.sequence, seq);
- e->event.sequence = seq;
- e->event.tv_sec = now.tv_sec;
- e->event.tv_usec = now.tv_usec;
+ list_del(&e->base.link);
drm_vblank_put(dev, e->pipe);
- list_move_tail(&e->base.link, &e->base.file_priv->event_list);
- wake_up_interruptible(&e->base.file_priv->event_wait);
- trace_drm_vblank_event_delivered(e->base.pid, e->pipe,
- e->event.sequence);
+ send_vblank_event(dev, e, seq, &now);
}
spin_unlock_irqrestore(&dev->event_lock, flags);
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 05af0e7..ee8f927 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1437,6 +1437,8 @@ extern int drm_vblank_wait(struct drm_device *dev, unsigned int *vbl_seq);
extern u32 drm_vblank_count(struct drm_device *dev, int crtc);
extern u32 drm_vblank_count_and_time(struct drm_device *dev, int crtc,
struct timeval *vblanktime);
+extern void drm_send_vblank_event(struct drm_device *dev, int crtc,
+ struct drm_pending_vblank_event *e);
extern bool drm_handle_vblank(struct drm_device *dev, int crtc);
extern int drm_vblank_get(struct drm_device *dev, int crtc);
extern void drm_vblank_put(struct drm_device *dev, int crtc);
--
1.7.9.5
[View Less]