Release 4.11 drivers/gpu/drm/exynos/exynos_drm_crtc.c
/* exynos_drm_crtc.c
*
* Copyright (c) 2011 Samsung Electronics Co., Ltd.
* Authors:
* Inki Dae <inki.dae@samsung.com>
* Joonyoung Shim <jy0922.shim@samsung.com>
* Seung-Woo Kim <sw0312.kim@samsung.com>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*/
#include <drm/drmP.h>
#include <drm/drm_crtc_helper.h>
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include "exynos_drm_crtc.h"
#include "exynos_drm_drv.h"
#include "exynos_drm_plane.h"
static void exynos_drm_crtc_enable(struct drm_crtc *crtc)
{
struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
if (exynos_crtc->ops->enable)
exynos_crtc->ops->enable(exynos_crtc);
drm_crtc_vblank_on(crtc);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Gustavo Fernando Padovan | 18 | 41.86% | 2 | 40.00% |
Inki Dae | 14 | 32.56% | 2 | 40.00% |
Joonyoung Shim | 11 | 25.58% | 1 | 20.00% |
Total | 43 | 100.00% | 5 | 100.00% |
static void exynos_drm_crtc_disable(struct drm_crtc *crtc)
{
struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
drm_crtc_vblank_off(crtc);
if (exynos_crtc->ops->disable)
exynos_crtc->ops->disable(exynos_crtc);
if (crtc->state->event && !crtc->state->active) {
spin_lock_irq(&crtc->dev->event_lock);
drm_crtc_send_vblank_event(crtc, crtc->state->event);
spin_unlock_irq(&crtc->dev->event_lock);
crtc->state->event = NULL;
}
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Inki Dae | 62 | 62.63% | 3 | 30.00% |
Gustavo Fernando Padovan | 26 | 26.26% | 4 | 40.00% |
Sean Paul | 9 | 9.09% | 1 | 10.00% |
Andrzej Hajda | 1 | 1.01% | 1 | 10.00% |
Joonyoung Shim | 1 | 1.01% | 1 | 10.00% |
Total | 99 | 100.00% | 10 | 100.00% |
static void
exynos_drm_crtc_mode_set_nofb(struct drm_crtc *crtc)
{
struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
if (exynos_crtc->ops->commit)
exynos_crtc->ops->commit(exynos_crtc);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Inki Dae | 15 | 39.47% | 2 | 40.00% |
Joonyoung Shim | 12 | 31.58% | 1 | 20.00% |
Gustavo Fernando Padovan | 11 | 28.95% | 2 | 40.00% |
Total | 38 | 100.00% | 5 | 100.00% |
static int exynos_crtc_atomic_check(struct drm_crtc *crtc,
struct drm_crtc_state *state)
{
struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
if (!state->enable)
return 0;
if (exynos_crtc->ops->atomic_check)
return exynos_crtc->ops->atomic_check(exynos_crtc, state);
return 0;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Andrzej Hajda | 59 | 100.00% | 2 | 100.00% |
Total | 59 | 100.00% | 2 | 100.00% |
static void exynos_crtc_atomic_begin(struct drm_crtc *crtc,
struct drm_crtc_state *old_crtc_state)
{
struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
if (exynos_crtc->ops->atomic_begin)
exynos_crtc->ops->atomic_begin(exynos_crtc);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Gustavo Fernando Padovan | 20 | 46.51% | 2 | 50.00% |
Inki Dae | 18 | 41.86% | 1 | 25.00% |
Maarten Lankhorst | 5 | 11.63% | 1 | 25.00% |
Total | 43 | 100.00% | 4 | 100.00% |
static void exynos_crtc_atomic_flush(struct drm_crtc *crtc,
struct drm_crtc_state *old_crtc_state)
{
struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
if (exynos_crtc->ops->atomic_flush)
exynos_crtc->ops->atomic_flush(exynos_crtc);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Gustavo Fernando Padovan | 37 | 86.05% | 2 | 50.00% |
Maarten Lankhorst | 5 | 11.63% | 1 | 25.00% |
Andrzej Hajda | 1 | 2.33% | 1 | 25.00% |
Total | 43 | 100.00% | 4 | 100.00% |
static const struct drm_crtc_helper_funcs exynos_crtc_helper_funcs = {
.enable = exynos_drm_crtc_enable,
.disable = exynos_drm_crtc_disable,
.mode_set_nofb = exynos_drm_crtc_mode_set_nofb,
.atomic_check = exynos_crtc_atomic_check,
.atomic_begin = exynos_crtc_atomic_begin,
.atomic_flush = exynos_crtc_atomic_flush,
};
void exynos_crtc_handle_event(struct exynos_drm_crtc *exynos_crtc)
{
struct drm_crtc *crtc = &exynos_crtc->base;
struct drm_pending_vblank_event *event = crtc->state->event;
unsigned long flags;
if (event) {
crtc->state->event = NULL;
spin_lock_irqsave(&crtc->dev->event_lock, flags);
if (drm_crtc_vblank_get(crtc) == 0)
drm_crtc_arm_vblank_event(crtc, event);
else
drm_crtc_send_vblank_event(crtc, event);
spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
}
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Andrzej Hajda | 96 | 98.97% | 2 | 66.67% |
Gustavo Fernando Padovan | 1 | 1.03% | 1 | 33.33% |
Total | 97 | 100.00% | 3 | 100.00% |
static void exynos_drm_crtc_destroy(struct drm_crtc *crtc)
{
struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
drm_crtc_cleanup(crtc);
kfree(exynos_crtc);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Inki Dae | 31 | 100.00% | 1 | 100.00% |
Total | 31 | 100.00% | 1 | 100.00% |
static const struct drm_crtc_funcs exynos_crtc_funcs = {
.set_config = drm_atomic_helper_set_config,
.page_flip = drm_atomic_helper_page_flip,
.destroy = exynos_drm_crtc_destroy,
.reset = drm_atomic_helper_crtc_reset,
.atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_crtc_destroy_state,
};
struct exynos_drm_crtc *exynos_drm_crtc_create(struct drm_device *drm_dev,
struct drm_plane *plane,
int pipe,
enum exynos_drm_output_type type,
const struct exynos_drm_crtc_ops *ops,
void *ctx)
{
struct exynos_drm_crtc *exynos_crtc;
struct drm_crtc *crtc;
int ret;
exynos_crtc = kzalloc(sizeof(*exynos_crtc), GFP_KERNEL);
if (!exynos_crtc)
return ERR_PTR(-ENOMEM);
exynos_crtc->pipe = pipe;
exynos_crtc->type = type;
exynos_crtc->ops = ops;
exynos_crtc->ctx = ctx;
crtc = &exynos_crtc->base;
ret = drm_crtc_init_with_planes(drm_dev, crtc, plane, NULL,
&exynos_crtc_funcs, NULL);
if (ret < 0)
goto err_crtc;
drm_crtc_helper_add(crtc, &exynos_crtc_helper_funcs);
return exynos_crtc;
err_crtc:
plane->funcs->destroy(plane);
kfree(exynos_crtc);
return ERR_PTR(ret);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Inki Dae | 61 | 37.42% | 1 | 8.33% |
Gustavo Fernando Padovan | 54 | 33.13% | 6 | 50.00% |
Andrzej Hajda | 38 | 23.31% | 1 | 8.33% |
Sean Paul | 5 | 3.07% | 1 | 8.33% |
Ville Syrjälä | 2 | 1.23% | 1 | 8.33% |
Joonyoung Shim | 2 | 1.23% | 1 | 8.33% |
Krzysztof Kozlowski | 1 | 0.61% | 1 | 8.33% |
Total | 163 | 100.00% | 12 | 100.00% |
int exynos_drm_crtc_enable_vblank(struct drm_device *dev, unsigned int pipe)
{
struct exynos_drm_crtc *exynos_crtc = exynos_drm_crtc_from_pipe(dev,
pipe);
if (exynos_crtc->ops->enable_vblank)
return exynos_crtc->ops->enable_vblank(exynos_crtc);
return 0;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Inki Dae | 27 | 57.45% | 2 | 28.57% |
Sean Paul | 11 | 23.40% | 1 | 14.29% |
Gustavo Fernando Padovan | 5 | 10.64% | 2 | 28.57% |
Andrzej Hajda | 3 | 6.38% | 1 | 14.29% |
Thierry Reding | 1 | 2.13% | 1 | 14.29% |
Total | 47 | 100.00% | 7 | 100.00% |
void exynos_drm_crtc_disable_vblank(struct drm_device *dev, unsigned int pipe)
{
struct exynos_drm_crtc *exynos_crtc = exynos_drm_crtc_from_pipe(dev,
pipe);
if (exynos_crtc->ops->disable_vblank)
exynos_crtc->ops->disable_vblank(exynos_crtc);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Inki Dae | 25 | 58.14% | 2 | 33.33% |
Sean Paul | 11 | 25.58% | 1 | 16.67% |
Gustavo Fernando Padovan | 3 | 6.98% | 1 | 16.67% |
Andrzej Hajda | 3 | 6.98% | 1 | 16.67% |
Thierry Reding | 1 | 2.33% | 1 | 16.67% |
Total | 43 | 100.00% | 6 | 100.00% |
int exynos_drm_crtc_get_pipe_from_type(struct drm_device *drm_dev,
enum exynos_drm_output_type out_type)
{
struct drm_crtc *crtc;
list_for_each_entry(crtc, &drm_dev->mode_config.crtc_list, head) {
struct exynos_drm_crtc *exynos_crtc;
exynos_crtc = to_exynos_crtc(crtc);
if (exynos_crtc->type == out_type)
return exynos_crtc->pipe;
}
return -EPERM;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Inki Dae | 56 | 96.55% | 1 | 50.00% |
Gustavo Fernando Padovan | 2 | 3.45% | 1 | 50.00% |
Total | 58 | 100.00% | 2 | 100.00% |
void exynos_drm_crtc_te_handler(struct drm_crtc *crtc)
{
struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
if (exynos_crtc->ops->te_handler)
exynos_crtc->ops->te_handler(exynos_crtc);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
YoungJun Cho | 32 | 86.49% | 1 | 50.00% |
Gustavo Fernando Padovan | 5 | 13.51% | 1 | 50.00% |
Total | 37 | 100.00% | 2 | 100.00% |
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Inki Dae | 336 | 37.37% | 8 | 17.39% |
Andrzej Hajda | 239 | 26.59% | 7 | 15.22% |
Gustavo Fernando Padovan | 205 | 22.80% | 17 | 36.96% |
Sean Paul | 36 | 4.00% | 1 | 2.17% |
YoungJun Cho | 32 | 3.56% | 1 | 2.17% |
Joonyoung Shim | 30 | 3.34% | 5 | 10.87% |
Maarten Lankhorst | 10 | 1.11% | 1 | 2.17% |
Mark Brown | 3 | 0.33% | 1 | 2.17% |
Ville Syrjälä | 3 | 0.33% | 2 | 4.35% |
David Howells | 2 | 0.22% | 1 | 2.17% |
Thierry Reding | 2 | 0.22% | 1 | 2.17% |
Krzysztof Kozlowski | 1 | 0.11% | 1 | 2.17% |
Total | 899 | 100.00% | 46 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.