4 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
6 * Licensed under the Apache License, Version 2.0 (the License);
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
23 #include "display-actor.h"
24 #include "core/list.h"
25 #include "core/common.h"
27 static dd_list *actor_head;
29 void display_add_actor(struct display_actor_ops *actor)
31 DD_LIST_APPEND(actor_head, actor);
34 static struct display_actor_ops *display_find_actor(enum display_actor_id id)
37 struct display_actor_ops *actor;
39 DD_LIST_FOREACH(actor_head, elem, actor) {
46 int display_set_caps(enum display_actor_id id, unsigned int caps)
48 struct display_actor_ops *actor;
53 actor = display_find_actor(id);
62 int display_reset_caps(enum display_actor_id id, unsigned int caps)
64 struct display_actor_ops *actor;
69 actor = display_find_actor(id);
78 unsigned int display_get_caps(enum display_actor_id id)
80 struct display_actor_ops *actor;
85 actor = display_find_actor(id);
92 int display_has_caps(unsigned int total_caps, unsigned int caps)
94 if (!total_caps || !caps)
97 if ((total_caps & caps) == caps)