cregit-Linux how code gets into the kernel

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

PersonTokensPropCommitsCommitProp
Gustavo Fernando Padovan1841.86%240.00%
Inki Dae1432.56%240.00%
Joonyoung 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); 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

PersonTokensPropCommitsCommitProp
Inki Dae6262.63%330.00%
Gustavo Fernando Padovan2626.26%440.00%
Sean Paul99.09%110.00%
Andrzej Hajda11.01%110.00%
Joonyoung Shim11.01%110.00%
Total99100.00%10100.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 Dae1539.47%240.00%
Joonyoung Shim1231.58%120.00%
Gustavo Fernando 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 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); if (exynos_crtc->ops->atomic_begin) exynos_crtc->ops->atomic_begin(exynos_crtc); }

Contributors

PersonTokensPropCommitsCommitProp
Gustavo Fernando Padovan2046.51%250.00%
Inki Dae1841.86%125.00%
Maarten Lankhorst511.63%125.00%
Total43100.00%4100.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 Fernando Padovan3786.05%250.00%
Maarten Lankhorst511.63%125.00%
Andrzej Hajda12.33%125.00%
Total43100.00%4100.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

PersonTokensPropCommitsCommitProp
Andrzej Hajda9698.97%266.67%
Gustavo Fernando Padovan11.03%133.33%
Total97100.00%3100.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

PersonTokensPropCommitsCommitProp
Inki Dae31100.00%1100.00%
Total31100.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 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

PersonTokensPropCommitsCommitProp
Inki Dae6137.42%18.33%
Gustavo Fernando Padovan5433.13%650.00%
Andrzej Hajda3823.31%18.33%
Sean Paul53.07%18.33%
Ville Syrjälä21.23%18.33%
Joonyoung Shim21.23%18.33%
Krzysztof Kozlowski10.61%18.33%
Total163100.00%12100.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 Dae2757.45%228.57%
Sean Paul1123.40%114.29%
Gustavo Fernando Padovan510.64%228.57%
Andrzej Hajda36.38%114.29%
Thierry 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 Dae2558.14%233.33%
Sean Paul1125.58%116.67%
Gustavo Fernando Padovan36.98%116.67%
Andrzej Hajda36.98%116.67%
Thierry Reding12.33%116.67%
Total43100.00%6100.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 Dae5696.55%150.00%
Gustavo Fernando 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 Cho3286.49%150.00%
Gustavo Fernando Padovan513.51%150.00%
Total37100.00%2100.00%


Overall Contributors

PersonTokensPropCommitsCommitProp
Inki Dae33637.37%817.39%
Andrzej Hajda23926.59%715.22%
Gustavo Fernando Padovan20522.80%1736.96%
Sean Paul364.00%12.17%
YoungJun Cho323.56%12.17%
Joonyoung Shim303.34%510.87%
Maarten Lankhorst101.11%12.17%
Mark Brown30.33%12.17%
Ville Syrjälä30.33%24.35%
David Howells20.22%12.17%
Thierry Reding20.22%12.17%
Krzysztof Kozlowski10.11%12.17%
Total899100.00%46100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.