1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun * (C) Copyright 2012,2015 Stephen Warren 3*4882a593Smuzhiyun * 4*4882a593Smuzhiyun * SPDX-License-Identifier: GPL-2.0+ 5*4882a593Smuzhiyun */ 6*4882a593Smuzhiyun 7*4882a593Smuzhiyun #ifndef _BCM2835_MSG_H 8*4882a593Smuzhiyun #define _BCM2835_MSG_H 9*4882a593Smuzhiyun 10*4882a593Smuzhiyun /** 11*4882a593Smuzhiyun * bcm2835_power_on_module() - power on an SoC module 12*4882a593Smuzhiyun * 13*4882a593Smuzhiyun * @module: ID of module to power on (BCM2835_MBOX_POWER_DEVID_...) 14*4882a593Smuzhiyun * @return 0 if OK, -EIO on error 15*4882a593Smuzhiyun */ 16*4882a593Smuzhiyun int bcm2835_power_on_module(u32 module); 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun /** 19*4882a593Smuzhiyun * bcm2835_get_mmc_clock() - get the frequency of the MMC clock 20*4882a593Smuzhiyun * 21*4882a593Smuzhiyun * @return clock frequency, or -ve on error 22*4882a593Smuzhiyun */ 23*4882a593Smuzhiyun int bcm2835_get_mmc_clock(void); 24*4882a593Smuzhiyun 25*4882a593Smuzhiyun /** 26*4882a593Smuzhiyun * bcm2835_get_video_size() - get the current display size 27*4882a593Smuzhiyun * 28*4882a593Smuzhiyun * @widthp: Returns the width in pixels 29*4882a593Smuzhiyun * @heightp: Returns the height in pixels 30*4882a593Smuzhiyun * @return 0 if OK, -ve on error 31*4882a593Smuzhiyun */ 32*4882a593Smuzhiyun int bcm2835_get_video_size(int *widthp, int *heightp); 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun /** 35*4882a593Smuzhiyun * bcm2835_set_video_params() - set the video parameters 36*4882a593Smuzhiyun * 37*4882a593Smuzhiyun * @widthp: Video width to request (returns the actual width selected) 38*4882a593Smuzhiyun * @heightp: Video height to request (returns the actual height selected) 39*4882a593Smuzhiyun * @depth_bpp: Requested bit depth 40*4882a593Smuzhiyun * @pixel_order: Pixel order to use (BCM2835_MBOX_PIXEL_ORDER_...) 41*4882a593Smuzhiyun * @alpha_mode: Alpha transparency mode to use (BCM2835_MBOX_ALPHA_MODE_...) 42*4882a593Smuzhiyun * @fb_basep: Returns base address of frame buffer 43*4882a593Smuzhiyun * @fb_sizep: Returns size of frame buffer 44*4882a593Smuzhiyun * @pitchp: Returns number of bytes in each frame buffer line 45*4882a593Smuzhiyun * @return 0 if OK, -ve on error 46*4882a593Smuzhiyun */ 47*4882a593Smuzhiyun int bcm2835_set_video_params(int *widthp, int *heightp, int depth_bpp, 48*4882a593Smuzhiyun int pixel_order, int alpha_mode, ulong *fb_basep, 49*4882a593Smuzhiyun ulong *fb_sizep, int *pitchp); 50*4882a593Smuzhiyun 51*4882a593Smuzhiyun #endif 52