cregit-Linux how code gets into the kernel

Release 4.17 drivers/gpu/drm/amd/display/dc/core/dc_surface.c

/*
 * Copyright 2015 Advanced Micro Devices, Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 *
 * Authors: AMD
 *
 */

/* DC interface (public) */
#include "dm_services.h"
#include "dc.h"

/* DC core (private) */
#include "core_types.h"
#include "transform.h"
#include "dpp.h"

/*******************************************************************************
 * Private functions
 ******************************************************************************/

static void construct(struct dc_context *ctx, struct dc_plane_state *plane_state) { plane_state->ctx = ctx; }

Contributors

PersonTokensPropCommitsCommitProp
Harry Wentland2195.45%375.00%
Dave Airlie14.55%125.00%
Total22100.00%4100.00%


static void destruct(struct dc_plane_state *plane_state) { if (plane_state->gamma_correction != NULL) { dc_gamma_release(&plane_state->gamma_correction); } if (plane_state->in_transfer_func != NULL) { dc_transfer_func_release( plane_state->in_transfer_func); plane_state->in_transfer_func = NULL; } }

Contributors

PersonTokensPropCommitsCommitProp
Amy Zhang1528.85%114.29%
Harry Wentland1426.92%342.86%
Anthony Koo1325.00%114.29%
Yongqiang Sun1019.23%228.57%
Total52100.00%7100.00%

/******************************************************************************* * Public functions ******************************************************************************/
void enable_surface_flip_reporting(struct dc_plane_state *plane_state, uint32_t controller_id) { plane_state->irq_source = controller_id + DC_IRQ_SOURCE_PFLIP1 - 1; /*register_flip_interrupt(surface);*/ }

Contributors

PersonTokensPropCommitsCommitProp
Harry Wentland24100.00%3100.00%
Total24100.00%3100.00%


struct dc_plane_state *dc_create_plane_state(struct dc *dc) { struct dc *core_dc = dc; struct dc_plane_state *plane_state = kvzalloc(sizeof(*plane_state), GFP_KERNEL); if (NULL == plane_state) return NULL; kref_init(&plane_state->refcount); construct(core_dc->ctx, plane_state); return plane_state; }

Contributors

PersonTokensPropCommitsCommitProp
Harry Wentland5078.12%450.00%
Dave Airlie1218.75%225.00%
Bhawanpreet Lakha11.56%112.50%
Michel Dänzer11.56%112.50%
Total64100.00%8100.00%


const struct dc_plane_status *dc_plane_get_status( const struct dc_plane_state *plane_state) { const struct dc_plane_status *plane_status; struct dc *core_dc; int i; if (!plane_state || !plane_state->ctx || !plane_state->ctx->dc) { ASSERT(0); return NULL; /* remove this if above assert never hit */ } plane_status = &plane_state->status; core_dc = plane_state->ctx->dc; if (core_dc->current_state == NULL) return NULL; for (i = 0; i < core_dc->res_pool->pipe_count; i++) { struct pipe_ctx *pipe_ctx = &core_dc->current_state->res_ctx.pipe_ctx[i]; if (pipe_ctx->plane_state != plane_state) continue; core_dc->hwss.update_pending_status(pipe_ctx); } return plane_status; }

Contributors

PersonTokensPropCommitsCommitProp
Harry Wentland11985.61%450.00%
Tony Cheng1712.23%225.00%
Jerry (Fangzhi) Zuo21.44%112.50%
Bhawanpreet Lakha10.72%112.50%
Total139100.00%8100.00%


void dc_plane_state_retain(struct dc_plane_state *plane_state) { kref_get(&plane_state->refcount); }

Contributors

PersonTokensPropCommitsCommitProp
Harry Wentland1372.22%360.00%
Jerry (Fangzhi) Zuo316.67%120.00%
Dave Airlie211.11%120.00%
Total18100.00%5100.00%


static void dc_plane_state_free(struct kref *kref) { struct dc_plane_state *plane_state = container_of(kref, struct dc_plane_state, refcount); destruct(plane_state); kvfree(plane_state); }

Contributors

PersonTokensPropCommitsCommitProp
Dave Airlie2055.56%116.67%
Harry Wentland925.00%233.33%
Jerry (Fangzhi) Zuo38.33%116.67%
Andrey Grodzovsky38.33%116.67%
Michel Dänzer12.78%116.67%
Total36100.00%6100.00%


void dc_plane_state_release(struct dc_plane_state *plane_state) { kref_put(&plane_state->refcount, dc_plane_state_free); }

Contributors

PersonTokensPropCommitsCommitProp
Dave Airlie1365.00%133.33%
Harry Wentland735.00%266.67%
Total20100.00%3100.00%


void dc_gamma_retain(struct dc_gamma *gamma) { kref_get(&gamma->refcount); }

Contributors

PersonTokensPropCommitsCommitProp
Harry Wentland950.00%240.00%
Andrey Grodzovsky422.22%120.00%
Dave Airlie316.67%120.00%
Jerry (Fangzhi) Zuo211.11%120.00%
Total18100.00%5100.00%


static void dc_gamma_free(struct kref *kref) { struct dc_gamma *gamma = container_of(kref, struct dc_gamma, refcount); kvfree(gamma); }

Contributors

PersonTokensPropCommitsCommitProp
Dave Airlie2580.65%125.00%
Harry Wentland39.68%125.00%
Jerry (Fangzhi) Zuo26.45%125.00%
Michel Dänzer13.23%125.00%
Total31100.00%4100.00%


void dc_gamma_release(struct dc_gamma **gamma) { kref_put(&(*gamma)->refcount, dc_gamma_free); *gamma = NULL; }

Contributors

PersonTokensPropCommitsCommitProp
Harry Wentland1862.07%240.00%
Yongqiang Sun517.24%120.00%
Dave Airlie413.79%120.00%
Jerry (Fangzhi) Zuo26.90%120.00%
Total29100.00%5100.00%


struct dc_gamma *dc_create_gamma(void) { struct dc_gamma *gamma = kvzalloc(sizeof(*gamma), GFP_KERNEL); if (gamma == NULL) goto alloc_fail; kref_init(&gamma->refcount); return gamma; alloc_fail: return NULL; }

Contributors

PersonTokensPropCommitsCommitProp
Harry Wentland3672.00%337.50%
Dave Airlie510.00%225.00%
Anthony Koo510.00%112.50%
Jerry (Fangzhi) Zuo36.00%112.50%
Michel Dänzer12.00%112.50%
Total50100.00%8100.00%


void dc_transfer_func_retain(struct dc_transfer_func *tf) { kref_get(&tf->refcount); }

Contributors

PersonTokensPropCommitsCommitProp
Anthony Koo844.44%120.00%
Andrey Grodzovsky422.22%120.00%
Dave Airlie316.67%120.00%
Jerry (Fangzhi) Zuo211.11%120.00%
Leo (Sunpeng) Li15.56%120.00%
Total18100.00%5100.00%


static void dc_transfer_func_free(struct kref *kref) { struct dc_transfer_func *tf = container_of(kref, struct dc_transfer_func, refcount); kvfree(tf); }

Contributors

PersonTokensPropCommitsCommitProp
Dave Airlie2580.65%125.00%
Anthony Koo39.68%125.00%
Jerry (Fangzhi) Zuo26.45%125.00%
Michel Dänzer13.23%125.00%
Total31100.00%4100.00%


void dc_transfer_func_release(struct dc_transfer_func *tf) { kref_put(&tf->refcount, dc_transfer_func_free); }

Contributors

PersonTokensPropCommitsCommitProp
Anthony Koo1365.00%125.00%
Dave Airlie420.00%125.00%
Jerry (Fangzhi) Zuo210.00%125.00%
Leo (Sunpeng) Li15.00%125.00%
Total20100.00%4100.00%


struct dc_transfer_func *dc_create_transfer_func(void) { struct dc_transfer_func *tf = kvzalloc(sizeof(*tf), GFP_KERNEL); if (tf == NULL) goto alloc_fail; kref_init(&tf->refcount); return tf; alloc_fail: return NULL; }

Contributors

PersonTokensPropCommitsCommitProp
Anthony Koo3162.00%112.50%
Harry Wentland918.00%225.00%
Dave Airlie510.00%225.00%
Jerry (Fangzhi) Zuo36.00%112.50%
Leo (Sunpeng) Li12.00%112.50%
Michel Dänzer12.00%112.50%
Total50100.00%8100.00%


Overall Contributors

PersonTokensPropCommitsCommitProp
Harry Wentland34854.21%625.00%
Dave Airlie12219.00%520.83%
Anthony Koo7311.37%14.17%
Jerry (Fangzhi) Zuo264.05%28.33%
Tony Cheng172.65%28.33%
Yongqiang Sun152.34%28.33%
Amy Zhang152.34%14.17%
Andrey Grodzovsky111.71%14.17%
Michel Dänzer60.93%14.17%
Yue Hin Lau30.47%14.17%
Leo (Sunpeng) Li30.47%14.17%
Bhawanpreet Lakha30.47%14.17%
Total642100.00%24100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.