cregit-Linux how code gets into the kernel

Release 4.7 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

PersonTokensPropCommitsCommitProp
gustavo padovangustavo padovan1841.86%240.00%
inki daeinki dae1432.56%240.00%
joonyoung shimjoonyoung shim1125.58%120.00%
Total43100.00%5100.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); }

Contributors

PersonTokensPropCommitsCommitProp
gustavo padovangustavo padovan2660.47%444.44%
sean paulsean paul920.93%111.11%
inki daeinki dae613.95%222.22%
joonyoung shimjoonyoung shim12.33%111.11%
andrzej hajdaandrzej hajda12.33%111.11%
Total43100.00%9100.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

PersonTokensPropCommitsCommitProp
inki daeinki dae1539.47%240.00%
joonyoung shimjoonyoung shim1231.58%120.00%
gustavo padovangustavo padovan1128.95%240.00%
Total38100.00%5100.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

PersonTokensPropCommitsCommitProp
andrzej hajdaandrzej hajda59100.00%2100.00%
Total59100.00%2100.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); exynos_crtc->event = crtc->state->event; if (exynos_crtc->ops->atomic_begin) exynos_crtc->ops->atomic_begin(exynos_crtc); }

Contributors

PersonTokensPropCommitsCommitProp
gustavo padovangustavo padovan2445.28%457.14%
inki daeinki dae2037.74%114.29%
maarten lankhorstmaarten lankhorst59.43%114.29%
mandeep singh bainesmandeep singh baines47.55%114.29%
Total53100.00%7100.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

PersonTokensPropCommitsCommitProp
gustavo padovangustavo padovan3888.37%266.67%
maarten lankhorstmaarten lankhorst511.63%133.33%
Total43100.00%3100.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, };
static void exynos_drm_crtc_destroy(struct drm_crtc *crtc) { struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc); struct exynos_drm_private *private = crtc->dev->dev_private; private->crtc[exynos_crtc->pipe] = NULL; drm_crtc_cleanup(crtc); kfree(exynos_crtc); }

Contributors

PersonTokensPropCommitsCommitProp
inki daeinki dae53100.00%1100.00%
Total53100.00%1100.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 exynos_drm_private *private = drm_dev->dev_private; 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; init_waitqueue_head(&exynos_crtc->wait_update); crtc = &exynos_crtc->base; private->crtc[pipe] = crtc; 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

PersonTokensPropCommitsCommitProp
inki daeinki dae7740.74%17.69%
gustavo padovangustavo padovan6232.80%753.85%
andrzej hajdaandrzej hajda3820.11%17.69%
sean paulsean paul73.70%17.69%
joonyoung shimjoonyoung shim21.06%17.69%
ville syrjalaville syrjala21.06%17.69%
krzysztof kozlowskikrzysztof kozlowski10.53%17.69%
Total189100.00%13100.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

PersonTokensPropCommitsCommitProp
inki daeinki dae2757.45%228.57%
sean paulsean paul1123.40%114.29%
gustavo padovangustavo padovan510.64%228.57%
andrzej hajdaandrzej hajda36.38%114.29%
thierry redingthierry reding12.13%114.29%
Total47100.00%7100.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

PersonTokensPropCommitsCommitProp
inki daeinki dae2558.14%233.33%
sean paulsean paul1125.58%116.67%
andrzej hajdaandrzej hajda36.98%116.67%
gustavo padovangustavo padovan36.98%116.67%
thierry redingthierry reding12.33%116.67%
Total43100.00%6100.00%


void exynos_drm_crtc_wait_pending_update(struct exynos_drm_crtc *exynos_crtc) { wait_event_timeout(exynos_crtc->wait_update, (atomic_read(&exynos_crtc->pending_update) == 0), msecs_to_jiffies(50)); }

Contributors

PersonTokensPropCommitsCommitProp
gustavo padovangustavo padovan34100.00%1100.00%
Total34100.00%1100.00%


void exynos_drm_crtc_finish_update(struct exynos_drm_crtc *exynos_crtc, struct exynos_drm_plane *exynos_plane) { struct drm_crtc *crtc = &exynos_crtc->base; unsigned long flags; exynos_plane->pending_fb = NULL; if (atomic_dec_and_test(&exynos_crtc->pending_update)) wake_up(&exynos_crtc->wait_update); spin_lock_irqsave(&crtc->dev->event_lock, flags); if (exynos_crtc->event) drm_crtc_send_vblank_event(crtc, exynos_crtc->event); exynos_crtc->event = NULL; spin_unlock_irqrestore(&crtc->dev->event_lock, flags); }

Contributors

PersonTokensPropCommitsCommitProp
gustavo padovangustavo padovan4242.86%342.86%
rahul sharmarahul sharma3939.80%114.29%
mandeep singh bainesmandeep singh baines1111.22%114.29%
inki daeinki dae55.10%114.29%
rob clarkrob clark11.02%114.29%
Total98100.00%7100.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

PersonTokensPropCommitsCommitProp
inki daeinki dae5696.55%150.00%
gustavo padovangustavo padovan23.45%150.00%
Total58100.00%2100.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

PersonTokensPropCommitsCommitProp
youngjun choyoungjun cho3286.49%150.00%
gustavo padovangustavo padovan513.51%150.00%
Total37100.00%2100.00%


void exynos_drm_crtc_cancel_page_flip(struct drm_crtc *crtc, struct drm_file *file) { struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc); struct drm_pending_vblank_event *e; unsigned long flags; spin_lock_irqsave(&crtc->dev->event_lock, flags); e = exynos_crtc->event; if (e && e->base.file_priv == file) { exynos_crtc->event = NULL; atomic_dec(&exynos_crtc->pending_update); } spin_unlock_irqrestore(&crtc->dev->event_lock, flags); if (e && e->base.file_priv == file) drm_event_cancel_free(crtc->dev, &e->base); }

Contributors

PersonTokensPropCommitsCommitProp
inki daeinki dae9279.31%150.00%
andrzej hajdaandrzej hajda2420.69%150.00%
Total116100.00%2100.00%


Overall Contributors

PersonTokensPropCommitsCommitProp
inki daeinki dae41739.64%815.09%
gustavo padovangustavo padovan32530.89%2241.51%
andrzej hajdaandrzej hajda13312.64%611.32%
rahul sharmarahul sharma393.71%11.89%
sean paulsean paul383.61%11.89%
youngjun choyoungjun cho323.04%11.89%
joonyoung shimjoonyoung shim302.85%59.43%
mandeep singh bainesmandeep singh baines151.43%11.89%
maarten lankhorstmaarten lankhorst100.95%11.89%
ville syrjalaville syrjala40.38%23.77%
mark brownmark brown30.29%11.89%
david howellsdavid howells20.19%11.89%
thierry redingthierry reding20.19%11.89%
rob clarkrob clark10.10%11.89%
krzysztof kozlowskikrzysztof kozlowski10.10%11.89%
Total1052100.00%53100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
{% endraw %}